mirror of
https://github.com/samba-team/samba.git
synced 2025-01-17 02:05:21 +03:00
Move -4 to correct side of comparison.
Jeremy. (This used to be commit d825026658b59364f9adc425bca4017be8e979e2)
This commit is contained in:
parent
d1e68f2ad4
commit
3a21fa3bb9
@ -653,8 +653,8 @@ static int switch_message(int type,char *inbuf,char *outbuf,int size,int bufsize
|
||||
errno = 0;
|
||||
last_message = type;
|
||||
|
||||
/* Make sure this is an SMB packet */
|
||||
if ((strncmp(smb_base(inbuf),"\377SMB",4) != 0) || (size - 4 < smb_size)) {
|
||||
/* Make sure this is an SMB packet. smb_size contains NetBIOS header so subtract 4 from it. */
|
||||
if ((strncmp(smb_base(inbuf),"\377SMB",4) != 0) || (size < (smb_size - 4))) {
|
||||
DEBUG(2,("Non-SMB packet of length %d. Terminating server\n",smb_len(inbuf)));
|
||||
exit_server("Non-SMB packet");
|
||||
return(-1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user