From ab7c46cc04abf5cc9380ca499462cd4257b96281 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 19 Feb 2014 13:57:28 +0100 Subject: [PATCH] s3:client: only limit the buffer by the given length 'n' Signed-off-by: Stefan Metzmacher Reviewed-by: Jeremy Allison (cherry picked from commit f0f245f4c8b1a506e8d06c72d3d6680b95738714) --- source3/client/client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/client/client.c b/source3/client/client.c index 49519afddb5..a3a1d0a7687 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -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; } -- 2.11.4.GIT