1
0
mirror of https://github.com/php/php-src.git synced 2026-04-26 17:38:14 +02:00

MFB: Fixed bug #37394 (substr_compare() returns an error when offset equals

string length).
This commit is contained in:
Ilia Alshanetsky
2006-05-10 13:07:56 +00:00
parent e4e7d27e4a
commit 7dd87b5307
+1 -1
View File
@@ -6824,7 +6824,7 @@ PHP_FUNCTION(substr_compare)
offset = (offset < 0) ? 0 : offset;
}
if ((offset + len) >= s1_len) {
if ((offset + len) > s1_len) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "The start position cannot exceed initial string length");
RETURN_FALSE;
}