X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Fstdio%2Fvswscanf.c;h=4c39f80655ddccc8e3599008427710a4da864b16;hp=4396d7df644d85c9749701bc4e3c2b2f4d361c33;hb=a12aa2918535fd370419bd24b50a33974091c5a7;hpb=2dd5dc78d4502381e2933137ed525acf339cb383 diff --git a/src/stdio/vswscanf.c b/src/stdio/vswscanf.c index 4396d7df..4c39f806 100644 --- a/src/stdio/vswscanf.c +++ b/src/stdio/vswscanf.c @@ -17,7 +17,7 @@ static size_t wstring_read(FILE *f, unsigned char *buf, size_t len) f->rend = f->buf + k; f->cookie = (void *)src; - if (!len) return 0; + if (!len || !k) return 0; *buf = *f->rpos++; return 1;