From 0a7aca63c0fe68449086074e32dd55bfcb9efdc2 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Tue, 16 Sep 2014 16:08:53 -0400 Subject: fix overflow corner case in strtoul-family functions incorrect behavior occurred only in cases where the input overflows unsigned long long, not just the (possibly lower) range limit for the result type. in this case, processing of the '-' sign character was not suppressed, and the function returned a value of 1 despite setting errno to ERANGE. (cherry picked from commit e2e1bb81485a37321d928a8d8b63f40b9d8fa228) --- src/internal/intscan.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/internal/intscan.c b/src/internal/intscan.c index 69350efa..65d497ec 100644 --- a/src/internal/intscan.c +++ b/src/internal/intscan.c @@ -83,6 +83,7 @@ unsigned long long __intscan(FILE *f, unsigned base, int pok, unsigned long long for (; val[c]