From 4f29706128f3d3a66f0503d07c4960d4021aaf27 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Tue, 11 Jun 2024 13:44:21 -0400 Subject: support watching for dangerous parameter access --- src/string/strxfrm.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/string/strxfrm.c') diff --git a/src/string/strxfrm.c b/src/string/strxfrm.c index 696027ce..f15c1e18 100644 --- a/src/string/strxfrm.c +++ b/src/string/strxfrm.c @@ -10,11 +10,15 @@ size_t strxfrm(char * restrict s1, const char * restrict s2, size_t n) SIGNAL_SAFE(0); ASSERT_NONNULL(s2); ASSERT_NOOVERLAP(s1, n, s2, n); + DANGEROUS_READ(s2, -1); + DANGEROUS_WRITE(s1, -1); if (n != 0) { ASSERT_NONNULL(s1); ASSERT_NOOVERLAP(s1, n, s2, n); } + + DANGER_OVER(); return strlen(s2); } -- cgit v1.2.1