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:
parent
05e821b220
commit
f0f245f4c8
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user