From: Duncan Overbruck Date: Tue, 5 Mar 2024 16:02:32 +0000 (+0100) Subject: strtonum: Do not abort on EINVAL from strtoi() X-Git-Tag: 0.12.2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e848f5aa298158243bde1c657821a2cdcfc1f88d;p=thirdparty%2Flibbsd.git strtonum: Do not abort on EINVAL from strtoi() With musl libc strtoimax(".", ...) returns EINVAL. Closes: !28 Signed-off-by: Guillem Jover --- diff --git a/src/strtonum.c b/src/strtonum.c index 8d6faa1..f85f741 100644 --- a/src/strtonum.c +++ b/src/strtonum.c @@ -58,6 +58,7 @@ strtonum(const char *nptr, long long minval, long long maxval, return rv; case ECANCELED: case ENOTSUP: + case EINVAL: goto out; case ERANGE: if (*eptr)