mirror of
https://github.com/samba-team/samba.git
synced 2025-03-10 12:58:35 +03:00
oops, must use read_data() not read(), as read() may only provide
part of the data stream. read_data() is a wrapper to guarantee receiving exactly the requested number of bytes. (This used to be commit 90c27b7bffa9b2121eaed0e07931830c3ba308d7)
This commit is contained in:
parent
7434c1aabd
commit
528399a8a2
@ -68,7 +68,7 @@ BOOL readwrite_pipe(pipes_struct *p, char *data, int len,
|
||||
{
|
||||
return False;
|
||||
}
|
||||
(*rlen) = read(p->m->fd, (*rdata), (*rlen));
|
||||
(*rlen) = read_data(p->m->fd, (*rdata), (*rlen));
|
||||
if ((*rlen) < 0)
|
||||
{
|
||||
return False;
|
||||
@ -115,6 +115,6 @@ int read_pipe(pipes_struct *p, char *data, int n)
|
||||
return -1;
|
||||
}
|
||||
|
||||
return read(p->m->fd, data, n);
|
||||
return read_data(p->m->fd, data, n);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user