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/string/memmove_s.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/string/memmove_s.c') diff --git a/src/string/memmove_s.c b/src/string/memmove_s.c index 0475ee00..a6d84b55 100644 --- a/src/string/memmove_s.c +++ b/src/string/memmove_s.c @@ -8,6 +8,7 @@ errno_t memmove_s(void *s1, rsize_t s1max, const void *s2, rsize_t n) SIGNAL_SAFE(0); ASSERT_NONNULL(s1); ASSERT_NONNULL(s2); + /* Overlap is explicitly allowed */ if (n > s1max) { /* do the right thing */ -- cgit v1.2.1