From e848f5aa298158243bde1c657821a2cdcfc1f88d Mon Sep 17 00:00:00 2001 From: Duncan Overbruck Date: Tue, 5 Mar 2024 17:02:32 +0100 Subject: [PATCH] strtonum: Do not abort on EINVAL from strtoi() With musl libc strtoimax(".", ...) returns EINVAL. Closes: !28 Signed-off-by: Guillem Jover --- src/strtonum.c | 1 + 1 file changed, 1 insertion(+) 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)