cvs: php-src /ext/standard string.c
| From: | Ilia Alshanetsky | Date: | Tue, 14 Mar 2006 14:55:27 +0000 |
| Subject: | cvs: php-src /ext/standard string.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-37268@lists.php.net to get a copy of this message | ||
iliaa Tue Mar 14 14:55:27 2006 UTC
Modified files:
/php-src/ext/standard string.c
Log:
MFB51: Fixed offset/length parameter validation in substr_compare() function.
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/string.c?r1=1.526&r2=1.527&diff_format=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.526 php-src/ext/standard/string.c:1.527
--- php-src/ext/standard/string.c:1.526 Mon Mar 13 14:37:32 2006
+++ php-src/ext/standard/string.c Tue Mar 14 14:55:27 2006
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: string.c,v 1.526 2006/03/13 14:37:32 iliaa Exp $ */
+/* $Id: string.c,v 1.527 2006/03/14 14:55:27 iliaa Exp $ */
/* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
@@ -6492,7 +6492,7 @@
offset = s1_len + offset;
}
- if (len && offset >= 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;
}