scottmac Thu Jan 29 22:58:53 2009 UTC
Modified files: (Branch: PHP_5_2)
/php-src/ext/mbstring mbstring.c
Log:
Fix bug #47245 - Double free in mb_detect_encoding()
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/mbstring.c?r1=1.224.2.22.2.42&r2=1.224.2.22.2.43&diff_format=u
Index: php-src/ext/mbstring/mbstring.c
diff -u php-src/ext/mbstring/mbstring.c:1.224.2.22.2.42
php-src/ext/mbstring/mbstring.c:1.224.2.22.2.43
--- php-src/ext/mbstring/mbstring.c:1.224.2.22.2.42 Wed Dec 31 11:17:39 2008
+++ php-src/ext/mbstring/mbstring.c Thu Jan 29 22:58:52 2009
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mbstring.c,v 1.224.2.22.2.42 2008/12/31 11:17:39 sebastian Exp $ */
+/* $Id: mbstring.c,v 1.224.2.22.2.43 2009/01/29 22:58:52 scottmac Exp $ */
/*
* PHP 4 Multibyte String module "mbstring"
@@ -2666,6 +2666,7 @@
if (!php_mb_parse_encoding_array(*arg_list, &list,
&size, 0 TSRMLS_CC)) {
if (list) {
efree(list);
+ list = NULL;
size = 0;
}
}
@@ -2675,6 +2676,7 @@
if (!php_mb_parse_encoding_list(Z_STRVAL_PP(arg_list),
Z_STRLEN_PP(arg_list), &list, &size, 0 TSRMLS_CC)) {
if (list) {
efree(list);
+ list = NULL;
size = 0;
}
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php