From 4592d107fc01c8cb46f99843529d145d268b35da Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 1 Jul 2001 13:18:35 +0000 Subject: cli_read() was reading too many bytes. (This used to be commit ba79d2a030b9ae087f0cc4248baa6cf6bee112fb) --- source3/libsmb/clireadwrite.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source3/libsmb') diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c index 54d3fd18e3..458532cb2e 100644 --- a/source3/libsmb/clireadwrite.c +++ b/source3/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 */ -- cgit