diff options
Diffstat (limited to 'ext/standard/string.c')
-rw-r--r-- | ext/standard/string.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/string.c b/ext/standard/string.c index ee1cdbb845..759528a232 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -1500,7 +1500,7 @@ PHPAPI size_t php_strcspn(char *s1, char *s2, char *s1_end, char *s2_end) if (*spanp == c || p == s1_end) { return p - s1; } - } while (spanp++ < s2_end); + } while (spanp++ < (s2_end - 1)); c = *++p; } /* NOTREACHED */ |