From 68467da17d576a17e4ff96c60f581561ac0bbe88 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Fri, 2 Feb 2024 13:22:25 -0500 Subject: check for invalid integer conversions --- src/stdlib/_strtoi.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/stdlib/_strtoi.h') diff --git a/src/stdlib/_strtoi.h b/src/stdlib/_strtoi.h index dc160aeb..194e0c8f 100644 --- a/src/stdlib/_strtoi.h +++ b/src/stdlib/_strtoi.h @@ -106,6 +106,7 @@ if (ret > max / base) { overflow = 1; + UNDEFINED("In call to %s(): %s (base %d) is not representable", __func__, start, base); } else { ret = (ret * base) + n; } -- cgit v1.2.1