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/stdio/fread.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/stdio/fread.c') diff --git a/src/stdio/fread.c b/src/stdio/fread.c index 5b7f38b4..7ddf358f 100644 --- a/src/stdio/fread.c +++ b/src/stdio/fread.c @@ -9,6 +9,7 @@ size_t fread(void * restrict ptr, size_t size, size_t nmemb, FILE * restrict str size_t n = 0; SIGNAL_SAFE(0); + ASSERT_NOOVERLAP(ptr, size * nmemb, stream, sizeof(*stream)); flockfile(stream); while (nmemb) { -- cgit v1.2.1