mirror of
https://github.com/samba-team/samba.git
synced 2025-12-14 20:23:54 +03:00
handle errors from receive_smb better, and print error string
This commit is contained in:
@@ -2683,12 +2683,11 @@ BOOL receive_smb(int fd,char *buffer,int timeout)
|
||||
if (len == -1)
|
||||
return(False);
|
||||
|
||||
if (len > BUFFER_SIZE)
|
||||
{
|
||||
DEBUG(0,("Invalid packet length! (%d bytes)\n",len));
|
||||
if (len > BUFFER_SIZE + (SAFETY_MARGIN/2))
|
||||
exit(1);
|
||||
}
|
||||
if (len > BUFFER_SIZE) {
|
||||
DEBUG(0,("Invalid packet length! (%d bytes)\n",len));
|
||||
if (len > BUFFER_SIZE + (SAFETY_MARGIN/2))
|
||||
exit(1);
|
||||
}
|
||||
|
||||
ok = (read_data(fd,buffer+4,len) == len);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user