summaryrefslogtreecommitdiff
path: root/src/stdio/freopen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdio/freopen.c')
-rw-r--r--src/stdio/freopen.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/stdio/freopen.c b/src/stdio/freopen.c
index b40eb439..d361023a 100644
--- a/src/stdio/freopen.c
+++ b/src/stdio/freopen.c
@@ -55,6 +55,9 @@ FILE * freopen(const char * restrict filename, const char * restrict mode, FILE
int fd = -1;
SIGNAL_SAFE(0);
+ ASSERT_NOOVERLAP(filename, strlen(filename), mode, strlen(mode));
+ ASSERT_NOOVERLAP(filename, strlen(filename), stream, sizeof(*stream));
+ ASSERT_NOOVERLAP(mode, strlen(mode), stream, sizeof(*stream));
for (i = 0; i < sizeof(modemap) / sizeof(modemap[0]); i++) {
if (!strcmp(modemap[i].smode, mode)) {