diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2002-10-11 14:48:25 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2002-10-11 14:48:25 +0000 |
commit | b7917def1346ef0374c551df7e9b056c803db324 (patch) | |
tree | c9676916935607a32bbd1c4f56cb525800e2d1d6 /ext/standard/php_string.h | |
parent | 0e384b473bd71ffac3bd0ae22c8d5f0c4add9de1 (diff) | |
download | php-git-b7917def1346ef0374c551df7e9b056c803db324.tar.gz |
Fixed bug #19865
Diffstat (limited to 'ext/standard/php_string.h')
-rw-r--r-- | ext/standard/php_string.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/php_string.h b/ext/standard/php_string.h index aa240a6036..734bf17627 100644 --- a/ext/standard/php_string.h +++ b/ext/standard/php_string.h @@ -138,7 +138,7 @@ php_memnstr(char *haystack, char *needle, int needle_len, char *end) end -= needle_len; while (p <= end) { - if ((p = strchr(p, *needle)) && ne == p[needle_len-1]) { + if ((p = memchr(p, *needle, (end-p+1))) && ne == p[needle_len-1]) { if (!memcmp(needle, p, needle_len-1)) { return p; } |