length).
[doc] Adjust length validation check inside substr_replace() to be similar
to that inside substr() so that excessive length is truncated to string
length.
- Fixed PECL bug #11216 (crash in ZipArchive::addEmptyDir when a directory
already exists). (Pierre)
+- Fixed bug #42142 (substr_replace() returns FALSE when length > string
+ length). (Ilia)
- Fixed bug #42135 (Second call of session_start() causes creation of SID).
(Ilia)
- Fixed Bug #42112 (deleting a node produces memory corruption). (Rob)
if (f > Z_STRLEN_PP(str) || (f < 0 && -f > Z_STRLEN_PP(str))) {
RETURN_FALSE;
} else if (l > Z_STRLEN_PP(str) || (l < 0 && -l > Z_STRLEN_PP(str))) {
- RETURN_FALSE;
+ l = Z_STRLEN_PP(str);
}
if ((f + l) > Z_STRLEN_PP(str)) {