diff options
Diffstat (limited to 'src/string/strncat_s.c')
-rw-r--r-- | src/string/strncat_s.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/string/strncat_s.c b/src/string/strncat_s.c index 8cc1875e..27761b6f 100644 --- a/src/string/strncat_s.c +++ b/src/string/strncat_s.c @@ -8,6 +8,8 @@ errno_t strncat_s(char * restrict s1, rsize_t s1max, const char * restrict s2, r ASSERT_NONNULL(s1); ASSERT_NONNULL(s2); ASSERT_NOOVERLAP(s1, s1max, s2, n); + DANGEROUS_READ(s2, n); + DANGEROUS_WRITE(s1, s1max); char *append = s1 + strlen(s1); for (size_t i = 0; i < n; i++) { @@ -22,6 +24,8 @@ errno_t strncat_s(char * restrict s1, rsize_t s1max, const char * restrict s2, r *append = '\0'; } + DANGER_OVER(); + return 0; } |