moriyoshi Tue Jan 21 14:32:18 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/mbstring php_mbregex.c Log: MFH: fixed mb_ereg_search() segfault Index: php4/ext/mbstring/php_mbregex.c diff -u php4/ext/mbstring/php_mbregex.c:1.18.2.1 php4/ext/mbstring/php_mbregex.c:1.18.2.2 --- php4/ext/mbstring/php_mbregex.c:1.18.2.1 Wed Nov 13 18:01:17 2002 +++ php4/ext/mbstring/php_mbregex.c Tue Jan 21 14:32:18 2003 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_mbregex.c,v 1.18.2.1 2002/11/13 23:01:17 edink Exp $ */ +/* $Id: php_mbregex.c,v 1.18.2.2 2003/01/21 19:32:18 moriyoshi Exp $ */ #ifdef HAVE_CONFIG_H @@ -770,7 +770,7 @@ pos = MBSTRG(search_pos); str = NULL; len = 0; - if (Z_TYPE_PP(MBSTRG(search_str)) == IS_STRING){ + if (MBSTRG(search_str) != NULL && Z_TYPE_PP(MBSTRG(search_str)) == IS_STRING){ str = (unsigned char *)Z_STRVAL_PP(MBSTRG(search_str)); len = Z_STRLEN_PP(MBSTRG(search_str)); }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php