diff options
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/process.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 372d96e79b..6b9e184afe 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -654,7 +654,7 @@ static int switch_message(int type,char *inbuf,char *outbuf,int size,int bufsize last_message = type; /* Make sure this is an SMB packet */ - if (strncmp(smb_base(inbuf),"\377SMB",4) != 0) { + if ((strncmp(smb_base(inbuf),"\377SMB",4) != 0) || (size - 4 < smb_size)) { DEBUG(2,("Non-SMB packet of length %d. Terminating server\n",smb_len(inbuf))); exit_server("Non-SMB packet"); return(-1); |