Merge branch 'develop_operators' of github.com:tianhe1986/php-src

* 'develop_operators' of github.com:tianhe1986/php-src:
  `memcmp` begins from the second char.
This commit is contained in:
Dmitry Stogov 2017-10-13 11:39:42 +03:00
commit 7a23c575f2

View File

@ -230,7 +230,7 @@ zend_memnrstr(const char *haystack, const char *needle, size_t needle_len, char
do {
if ((p = (const char *)zend_memrchr(haystack, *needle, (p - haystack) + 1)) && ne == p[needle_len-1]) {
if (!memcmp(needle, p, needle_len - 1)) {
if (!memcmp(needle + 1, p + 1, needle_len - 2)) {
return p;
}
}