sniper Wed Sep 3 12:24:16 2003 EDT
Modified files:
/php-src/ext/standard var_unserializer.re
Log:
- Fixed bug #25378 (Invalid data passed to unserialize() causes segfault)
Index: php-src/ext/standard/var_unserializer.re
diff -u php-src/ext/standard/var_unserializer.re:1.20
php-src/ext/standard/var_unserializer.re:1.21
--- php-src/ext/standard/var_unserializer.re:1.20 Tue Aug 5 05:15:31 2003
+++ php-src/ext/standard/var_unserializer.re Wed Sep 3 12:24:15 2003
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: var_unserializer.re,v 1.20 2003/08/05 09:15:31 stas Exp $ */
+/* $Id: var_unserializer.re,v 1.21 2003/09/03 16:24:15 sniper Exp $ */
#include "php.h"
#include "ext/standard/php_var.h"
@@ -110,6 +110,7 @@
/*!re2c
+uiv = [+]? [0-9]+;
iv = [+-]? [0-9]+;
nv = [+-]? ([0-9]* "." [0-9]+|[0-9]+ "." [0-9]*);
nvexp = (iv | nv) [eE] [+-]? iv;
@@ -305,7 +306,7 @@
return 1;
}
-"s:" iv ":" ["] {
+"s:" uiv ":" ["] {
int len;
char *str;
@@ -325,7 +326,7 @@
return 1;
}
-"a:" iv ":" "{" {
+"a:" uiv ":" "{" {
int elements = parse_iv(start + 2);
*p = YYCURSOR;
@@ -351,7 +352,7 @@
object_common1(UNSERIALIZE_PASSTHRU,
ZEND_STANDARD_CLASS_DEF_PTR));
}
-"O:" iv ":" ["] {
+"O:" uiv ":" ["] {
int len;
int elements;
int len2;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php