From a686d047d79bdfc37c096a4fa350c37e4ccf3cf5 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Mon, 3 Jun 2024 13:56:25 -0400 Subject: add LC_CTYPE epoch and use separate CT_ categories and CTM_ masks to support detecting change of LC_CTYPE between calls to wctype()/iswctype() and wctrans()/towctrans() --- src/string/strcpy.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/string/strcpy.c') diff --git a/src/string/strcpy.c b/src/string/strcpy.c index 3f5339bf..620fdd1e 100644 --- a/src/string/strcpy.c +++ b/src/string/strcpy.c @@ -10,12 +10,17 @@ char * strcpy(char * restrict s1, const char * restrict s2) SIGNAL_SAFE(0); ASSERT_NONNULL(s1); ASSERT_NONNULL(s2); + + DANGER(s2); + ASSERT_NOOVERLAP(s1, strlen(s2), s2, strlen(s2)); while ((*s1++ = *s2++) != '\0') { continue; } + DANGER(0); + /* RETURN_ALWAYS(ARGUMENT(s1)); */ -- cgit v1.2.1