Merge branch 'PHP-5.6' into PHP-7.0

# Resolved conflicts:
#	ext/mbstring/php_mbregex.c
This commit is contained in:
Christoph M. Becker 2016-07-28 15:24:41 +02:00
commit 805dc0ea47
3 changed files with 25 additions and 2 deletions

View file

@ -1408,7 +1408,7 @@ PHP_FUNCTION(mb_ereg_search_setpos)
return;
}
if (position < 0 || (!Z_ISUNDEF(MBREX(search_str)) && Z_TYPE(MBREX(search_str)) == IS_STRING && (size_t)position >= Z_STRLEN(MBREX(search_str)))) {
if (position < 0 || (!Z_ISUNDEF(MBREX(search_str)) && Z_TYPE(MBREX(search_str)) == IS_STRING && (size_t)position > Z_STRLEN(MBREX(search_str)))) {
php_error_docref(NULL, E_WARNING, "Position is out of range");
MBREX(search_pos) = 0;
RETURN_FALSE;