author | Rich Felker <dalias@aerifal.cx> | 2020年04月17日 13:46:57 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2020年04月17日 15:19:05 -0400 |
commit | b287cd745c2243f8e5114331763a5a9813b5f6ee (patch) | |
tree | 860dca24a3505f530ea0a3e9161895c96b2ab468 /src/stdio | |
parent | 19f870c3a68a959c7c6ef1de12086ac908920e5e (diff) | |
download | musl-b287cd745c2243f8e5114331763a5a9813b5f6ee.tar.gz |
-rw-r--r-- | src/stdio/vfscanf.c | 3 |
diff --git a/src/stdio/vfscanf.c b/src/stdio/vfscanf.c index 9e030fc4..b5ebc16e 100644 --- a/src/stdio/vfscanf.c +++ b/src/stdio/vfscanf.c @@ -76,6 +76,9 @@ int vfscanf(FILE *restrict f, const char *restrict fmt, va_list ap) FLOCK(f); + if (!f->rpos) __toread(f); + if (!f->rpos) goto input_fail; + for (p=(const unsigned char *)fmt; *p; p++) { alloc = 0; |