moriyoshi               Tue Apr  1 06:50:31 2003 EDT

  Modified files:              (Branch: PHP_4_3)
    /php4/ext/mbstring  mbstring.c 
  Log:
  MFH(r-1.170): fixed crash in mb_convert_encoding() that occurs when a void
  array is passed as the third parameter.
  # thanks Sascha
  
  
Index: php4/ext/mbstring/mbstring.c
diff -u php4/ext/mbstring/mbstring.c:1.142.2.10 php4/ext/mbstring/mbstring.c:1.142.2.11
--- php4/ext/mbstring/mbstring.c:1.142.2.10     Wed Mar  5 01:16:54 2003
+++ php4/ext/mbstring/mbstring.c        Tue Apr  1 06:50:31 2003
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: mbstring.c,v 1.142.2.10 2003/03/05 06:16:54 moriyoshi Exp $ */
+/* $Id: mbstring.c,v 1.142.2.11 2003/04/01 11:50:31 moriyoshi Exp $ */
 
 /*
  * PHP4 Multibyte String module "mbstring"
@@ -2594,7 +2594,7 @@
                                zend_hash_move_forward(target_hash);
                                i--;
                        }
-                       if ( !strlen(_from_encodings)) {
+                       if (_from_encodings != NULL && !strlen(_from_encodings)) {
                                efree(_from_encodings);
                                _from_encodings = NULL;
                        }



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to