diff options
Diffstat (limited to 'src/string/strncat.c')
-rw-r--r-- | src/string/strncat.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/string/strncat.c b/src/string/strncat.c index 3e51cbca..8a99f5b4 100644 --- a/src/string/strncat.c +++ b/src/string/strncat.c @@ -1,7 +1,6 @@ -#if 0 - #include <string.h> -#include "_assert.h" +#include "_safety.h" +#undef strncat /** concatenate bounded string **/ @@ -10,9 +9,10 @@ char * strncat(char * restrict s1, const char * restrict s2, size_t n) char *append = NULL; size_t i; + SIGNAL_SAFE(0); ASSERT_NONNULL(s1); ASSERT_NONNULL(s2); - ASSERT_NOOVERLAP(s1, s2, strlen(s1) + strlen(s2)); + ASSERT_NOOVERLAP(s1, n, s2, strlen(s1) + strlen(s2)); append = s1 + strlen(s1); @@ -42,6 +42,3 @@ terminated. RETURN_ALWAYS(ARGUMENT(s1)); STDC(1) */ - - -#endif |