felipe Mon Sep 22 13:09:09 2008 UTC
Modified files: (Branch: PHP_5_3)
/php-src/ext/spl spl_iterators.c
Log:
- MFH: Fixed bug #46088 (RegexIterator::accept - segfault)
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_iterators.c?r1=1.73.2.30.2.28.2.14&r2=1.73.2.30.2.28.2.15&diff_format=u
Index: php-src/ext/spl/spl_iterators.c
diff -u php-src/ext/spl/spl_iterators.c:1.73.2.30.2.28.2.14
php-src/ext/spl/spl_iterators.c:1.73.2.30.2.28.2.15
--- php-src/ext/spl/spl_iterators.c:1.73.2.30.2.28.2.14 Tue Sep 9 19:44:15 2008
+++ php-src/ext/spl/spl_iterators.c Mon Sep 22 13:09:09 2008
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: spl_iterators.c,v 1.73.2.30.2.28.2.14 2008/09/09 19:44:15 lbarnaud Exp
$ */
+/* $Id: spl_iterators.c,v 1.73.2.30.2.28.2.15 2008/09/22 13:09:09 felipe Exp $
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
@@ -1689,7 +1689,11 @@
char *subject, tmp[32], *result;
int subject_len, use_copy, count, result_len;
zval subject_copy, zcount, *replacement;
-
+
+ if (intern->current.data == NULL) {
+ RETURN_FALSE;
+ }
+
if (intern->u.regex.flags & REGIT_USE_KEY) {
if (intern->current.key_type == HASH_KEY_IS_LONG) {
subject_len = slprintf(tmp, sizeof(tmp), "%ld",
intern->current.int_key);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php