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/fgets.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/stdio/fgets.c') diff --git a/src/stdio/fgets.c b/src/stdio/fgets.c index 195e724a..68ca7750 100644 --- a/src/stdio/fgets.c +++ b/src/stdio/fgets.c @@ -7,6 +7,7 @@ char * fgets(char * restrict s, int n, FILE * restrict stream) { int i = 0; SIGNAL_SAFE(0); + ASSERT_NOOVERLAP(s, n, stream, sizeof(*stream)); if (feof(stream)) { return NULL; -- cgit v1.2.1