mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
there are places in the samba3 code that don't check properly for
packet-termination of strings. This change ensures that when we go past the end of a packet we hit 2 null bytes, thus terminating. We are relying on the SAFETY_MARGIN packet allocation stuff here.
This commit is contained in:
parent
8b8f0c5279
commit
655ec16828
@ -552,6 +552,10 @@ BOOL receive_smb_raw(int fd,char *buffer, unsigned int timeout)
|
||||
smb_read_error = READ_ERROR;
|
||||
return False;
|
||||
}
|
||||
|
||||
/* not all of samba3 properly checks for packet-termination of strings. This
|
||||
ensures that we don't run off into empty space. */
|
||||
SSVAL(buffer+4,len, 0);
|
||||
}
|
||||
|
||||
return True;
|
||||
|
Loading…
Reference in New Issue
Block a user