From 4b43b375b7abae22070cd86bfc26a8222233150e Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Wed, 31 Jan 2024 13:24:56 -0500 Subject: check for overlapping pointers --- src/stdlib/strtol.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/stdlib/strtol.c') diff --git a/src/stdlib/strtol.c b/src/stdlib/strtol.c index dc2b9d87..525273d9 100644 --- a/src/stdlib/strtol.c +++ b/src/stdlib/strtol.c @@ -2,6 +2,7 @@ #include #include #include +#include #include "_stdlib.h" /** convert string to long integer **/ @@ -13,6 +14,7 @@ long int strtol(const char * restrict nptr, char ** restrict endptr, int base) long int min = LONG_MIN; SIGNAL_SAFE(0); + ASSERT_NOOVERLAP(nptr, strlen(nptr), endptr, sizeof(*endptr)); #include "_strtoi.h" -- cgit v1.2.1