s3:client: only limit the buffer by the given length 'n'
authorStefan Metzmacher <metze@samba.org>
Wed, 19 Feb 2014 12:57:28 +0000 (13:57 +0100)
committerKarolin Seeger <kseeger@samba.org>
Tue, 1 Apr 2014 07:08:05 +0000 (09:08 +0200)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit f0f245f4c8b1a506e8d06c72d3d6680b95738714)

source3/client/client.c

index 49519afddb5ca9bbafb8417cc134cac2908e0158..a3a1d0a76871bd2f1ae24f38d2df323972c73bc7 100644 (file)
@@ -235,7 +235,7 @@ static int readfile(uint8_t *b, int n, XFILE *f)
                return x_fread(b,1,n,f);
 
        i = 0;
-       while (i < (n - 1) && (i < BUFFER_SIZE)) {
+       while (i < (n - 1)) {
                if ((c = x_getc(f)) == EOF) {
                        break;
                }