summaryrefslogtreecommitdiff
path: root/src/string/memmove.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/string/memmove.c')
-rw-r--r--src/string/memmove.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/string/memmove.c b/src/string/memmove.c
index 5d6dd3e0..5a6fdc97 100644
--- a/src/string/memmove.c
+++ b/src/string/memmove.c
@@ -8,6 +8,8 @@ void * memmove(void *s1, const void *s2, size_t n)
SIGNAL_SAFE(0);
ASSERT_NONNULL(s1);
ASSERT_NONNULL(s2);
+ DANGEROUS_READ(s2, n);
+ DANGEROUS_WRITE(s1, n);
if (s1 < s2) {
for (size_t i = 0; i < n; i++) {
@@ -22,6 +24,8 @@ void * memmove(void *s1, const void *s2, size_t n)
((char*)s1)[n] = ((char*)s2)[n];
}
+ DANGER_OVER();
+
/*
RETURN_ALWAYS(ARGUMENT(s1));
*/