mirror of
https://github.com/samba-team/samba.git
synced 2025-02-09 09:57:48 +03:00
using read_with_timeout(), min data size 16 bytes (DCE/RPC header), max
size of SMBtrans response, timeout of 10 seconds. read_data() _certainly_ doesn't work, as you don't know what size of the data is going to come back that needs to be fed back in the SMBtrans response. yes, oops :-)
This commit is contained in:
parent
90c27b7bff
commit
70d6f76357
@ -68,7 +68,11 @@ BOOL readwrite_pipe(pipes_struct *p, char *data, int len,
|
||||
{
|
||||
return False;
|
||||
}
|
||||
(*rlen) = read_data(p->m->fd, (*rdata), (*rlen));
|
||||
|
||||
/* read a minimum of an rpc header, then wait for up to 10 seconds
|
||||
* to read up to a maximum of the SMBtrans max data size
|
||||
*/
|
||||
(*rlen) = read_with_timeout(p->m->fd, (*rdata), 16, (*rlen), 10000);
|
||||
if ((*rlen) < 0)
|
||||
{
|
||||
return False;
|
||||
|
Loading…
x
Reference in New Issue
Block a user