X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=src%2Fstdio%2Fvswscanf.c;h=4c39f80655ddccc8e3599008427710a4da864b16;hb=a34b0465ba14c70532b8eaba650a9eac228fce57;hp=4396d7df644d85c9749701bc4e3c2b2f4d361c33;hpb=73ec1d0495bb676012fd69491900ca8beb989ef7;p=musl 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;