diff options
Diffstat (limited to 'src/string/strdup.c')
-rw-r--r-- | src/string/strdup.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/string/strdup.c b/src/string/strdup.c index 9780deaa..0016a267 100644 --- a/src/string/strdup.c +++ b/src/string/strdup.c @@ -5,7 +5,10 @@ char *strdup(const char *s) { ASSERT_NONNULL(s); + DANGEROUS_READ(s, -1); size_t len = strlen(s) + 1; + DANGER_OVER(); + char *dup = malloc(len); memcpy(dup, s, len); return dup; |