mirror of
https://github.com/samba-team/samba.git
synced 2025-03-27 22:50:26 +03:00
s3: net: Consider unprocessed in input buffer
If there is unprocessed data in the input buffer (ilen > 0), place new data read after the unprocessed one. Signed-off-by: Samuel Cabrero <scabrero@suse.de> Reviewed-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
parent
49e2d36918
commit
4646698f1b
@ -1016,7 +1016,7 @@ int reg_parse_fd(int fd, const struct reg_parse_callback* cb, const char* opts)
|
||||
space_to_read = sizeof(buf_in) - ilen;
|
||||
|
||||
/* Read the next chunk from the file. */
|
||||
nread = read(fd, buf_in, space_to_read);
|
||||
nread = read(fd, buf_in + ilen, space_to_read);
|
||||
if (nread < 0) {
|
||||
DBG_ERR("read failed: %s\n", strerror(errno));
|
||||
ret = -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user