diff options
Diffstat (limited to 'src/string/memset_s.c')
-rw-r--r-- | src/string/memset_s.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/string/memset_s.c b/src/string/memset_s.c index 90157c9b..3193ca32 100644 --- a/src/string/memset_s.c +++ b/src/string/memset_s.c @@ -6,6 +6,7 @@ errno_t memset_s(void *s, rsize_t smax, int c, rsize_t n) { SIGNAL_SAFE(0); ASSERT_NONNULL(s); + DANGEROUS_WRITE(s, smax); unsigned char *_s = (unsigned char *)s; rsize_t i = 0; @@ -14,6 +15,8 @@ errno_t memset_s(void *s, rsize_t smax, int c, rsize_t n) _s[i] = (unsigned char)c; } + DANGER_OVER(); + return 0; } |