diff options
Diffstat (limited to 'src/string/strncmp.c')
-rw-r--r-- | src/string/strncmp.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/string/strncmp.c b/src/string/strncmp.c index cf10e3f7..0cd6d872 100644 --- a/src/string/strncmp.c +++ b/src/string/strncmp.c @@ -10,12 +10,17 @@ int strncmp(const char *s1, const char *s2, size_t n) ASSERT_NONNULL(s2); /* no modifcation, overlap is OK */ + DANGEROUS_READ(s1, -1); if (strlen(s1) < n) { n = strlen(s1); } + DANGER_OVER(); + + DANGEROUS_READ(s2, -1); if (strlen(s2) < n) { n = strlen(s2); } + DANGER_OVER(); /* RETURN(NEGATIVE, ARGUMENT(s1) is less than ARGUMENT(s2)); |