diff options
author | Jeremy Allison <jra@samba.org> | 2007-11-01 22:42:21 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2007-11-01 22:42:21 -0700 |
commit | 10500184bf7aac4c1036a807ad4f57d2016d7bd0 (patch) | |
tree | 02954f35d3a1315b7d4f702783fa2cea112531a9 /source3/smbd | |
parent | bece9609cd633d69c2c8dc72fcb6c26c4f11f9f2 (diff) | |
download | samba-10500184bf7aac4c1036a807ad4f57d2016d7bd0.tar.gz samba-10500184bf7aac4c1036a807ad4f57d2016d7bd0.tar.bz2 samba-10500184bf7aac4c1036a807ad4f57d2016d7bd0.zip |
Ensure we can't accidently do a pipe write with
unread bytes in the socket buffer.
Jeremy
(This used to be commit 84d22f7747126608b9460f9591bb5967d871b82d)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/reply.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index c83066d41e..de0e852e2a 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -3949,6 +3949,11 @@ void reply_write_and_X(connection_struct *conn, struct smb_request *req) /* If it's an IPC, pass off the pipe handler. */ if (IS_IPC(conn)) { + if (req->unread_bytes) { + reply_doserror(req, ERRDOS, ERRbadmem); + END_PROFILE(SMBwriteX); + return; + } reply_pipe_write_and_X(req); END_PROFILE(SMBwriteX); return; |