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/rename.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/stdio/rename.c') diff --git a/src/stdio/rename.c b/src/stdio/rename.c index 84d0df35..9a701a1d 100644 --- a/src/stdio/rename.c +++ b/src/stdio/rename.c @@ -1,5 +1,6 @@ #include #include +#include #include "_stdio.h" #include "_syscall.h" @@ -8,6 +9,7 @@ int rename(const char *old, const char *new) { SIGNAL_SAFE(0); + ASSERT_NOOVERLAP(old, strlen(old), new, strlen(new)); SYSCALL(rename, int, -1, old, new, 0, 0, 0, 0); } -- cgit v1.2.1