]> granicus.if.org Git - php/commitdiff
Fixed crash in mb_convert_encoding() that occurs when a void array is
authorMoriyoshi Koizumi <moriyoshi@php.net>
Tue, 1 Apr 2003 11:49:30 +0000 (11:49 +0000)
committerMoriyoshi Koizumi <moriyoshi@php.net>
Tue, 1 Apr 2003 11:49:30 +0000 (11:49 +0000)
passed as the third parameter

ext/mbstring/mbstring.c

index 7c0c3de2d687a64fe5c93bef3543ec8b90e4e23a..ff1192737a69d7055a737e5186f3df8155a4b7fd 100644 (file)
@@ -1969,7 +1969,7 @@ PHP_FUNCTION(mb_convert_encoding)
                                zend_hash_move_forward(target_hash);
                                i--;
                        }
-                       if ( !strlen(_from_encodings)) {
+                       if (_from_encodings != NULL && !strlen(_from_encodings)) {
                                efree(_from_encodings);
                                _from_encodings = NULL;
                        }