scottmac                Thu Jan 29 23:01:49 2009 UTC

  Modified files:              
    /php-src/ext/mbstring       mbstring.c 
  Log:
  MFB Fix bug #47245 - Double free in mb_detect_encoding()
  
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/mbstring.c?r1=1.311&r2=1.312&diff_format=u
Index: php-src/ext/mbstring/mbstring.c
diff -u php-src/ext/mbstring/mbstring.c:1.311 
php-src/ext/mbstring/mbstring.c:1.312
--- php-src/ext/mbstring/mbstring.c:1.311       Mon Jan  5 09:16:38 2009
+++ php-src/ext/mbstring/mbstring.c     Thu Jan 29 23:01:40 2009
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: mbstring.c,v 1.311 2009/01/05 09:16:38 tony2001 Exp $ */
+/* $Id: mbstring.c,v 1.312 2009/01/29 23:01:40 scottmac Exp $ */
 
 /*
  * PHP 4 Multibyte String module "mbstring"
@@ -3018,6 +3018,7 @@
                        if (!php_mb_parse_encoding_array(encoding_list, &list, 
&size, 0 TSRMLS_CC)) {
                                if (list) {
                                        efree(list);
+                                       list = NULL;
                                        size = 0;
                                }
                        }
@@ -3027,6 +3028,7 @@
                        if 
(!php_mb_parse_encoding_list(Z_STRVAL_P(encoding_list), 
Z_STRLEN_P(encoding_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

Reply via email to