git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
200110a
)
cli_read() was reading too many bytes.
author
Andrew Tridgell
<tridge@samba.org>
Sun, 1 Jul 2001 13:18:35 +0000
(13:18 +0000)
committer
Andrew Tridgell
<tridge@samba.org>
Sun, 1 Jul 2001 13:18:35 +0000
(13:18 +0000)
source/libsmb/clireadwrite.c
patch
|
blob
|
history
diff --git
a/source/libsmb/clireadwrite.c
b/source/libsmb/clireadwrite.c
index 54d3fd18e3c1a0df6f7cc50aff91d006f6163658..458532cb2ede02626736d76fcffcfd8bb8f652b1 100644
(file)
--- a/
source/libsmb/clireadwrite.c
+++ b/
source/libsmb/clireadwrite.c
@@
-71,10
+71,9
@@
ssize_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_
*/
readsize = (cli->max_xmit - (smb_size+32)) & ~1023;
- if (readsize > size )
- readsize = size;
while (total < size) {
+ readsize = MIN(readsize, size-total);
/* Issue a read and receive a reply */