1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

s3:client: only limit the buffer by the given length 'n'

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Stefan Metzmacher 2014-02-19 13:57:28 +01:00 committed by Jeremy Allison
parent 05e821b220
commit f0f245f4c8

View File

@ -226,7 +226,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;
}