summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-04-17 21:17:19 -0400
committerRich Felker <dalias@aerifal.cx>2012-04-17 21:17:19 -0400
commitbb477f9fd4a69bac77c70d2099272ee1ac17e62c (patch)
treee46757c3f6144a7444181b6095aa1c64c32d4b42 /src
parent99fbf4cfdbb3b67f30d595a7f1c535ca17c2f969 (diff)
downloadmusl-bb477f9fd4a69bac77c70d2099272ee1ac17e62c.tar.gz
musl-bb477f9fd4a69bac77c70d2099272ee1ac17e62c.tar.bz2
musl-bb477f9fd4a69bac77c70d2099272ee1ac17e62c.tar.xz
musl-bb477f9fd4a69bac77c70d2099272ee1ac17e62c.zip
fix failure of int parser to unget an initial mismatching character
Diffstat (limited to 'src')
-rw-r--r--src/internal/intscan.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/internal/intscan.c b/src/internal/intscan.c
index a00f2ccc..d65fc45c 100644
--- a/src/internal/intscan.c
+++ b/src/internal/intscan.c
@@ -54,6 +54,7 @@ unsigned long long __intscan(FILE *f, unsigned base, int pok, unsigned long long
} else {
if (base == 0) base = 10;
if (val[c] >= base) {
+ shunget(f);
shlim(f, 0);
errno = EINVAL;
return 0;