hirokawa                Sun Feb 17 02:01:41 2008 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/ext/mbstring       php_unicode.c 
  Log:
  MF PHP5_3 (fixed #43998)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/php_unicode.c?r1=1.11.2.2.2.3&r2=1.11.2.2.2.4&diff_format=u
Index: php-src/ext/mbstring/php_unicode.c
diff -u php-src/ext/mbstring/php_unicode.c:1.11.2.2.2.3 
php-src/ext/mbstring/php_unicode.c:1.11.2.2.2.4
--- php-src/ext/mbstring/php_unicode.c:1.11.2.2.2.3     Mon Dec 31 07:20:07 2007
+++ php-src/ext/mbstring/php_unicode.c  Sun Feb 17 02:01:41 2008
@@ -276,6 +276,11 @@
        size_t i;
        enum mbfl_no_encoding _src_encoding = 
mbfl_name2no_encoding(src_encoding);
 
+       if (_src_encoding == mbfl_no_encoding_invalid) {
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown encoding 
\"%s\"", src_encoding);
+               return NULL;
+       }       
+
        unicode = php_mb_convert_encoding(srcstr, srclen, "UCS-4BE", 
src_encoding, &unicode_len TSRMLS_CC);
        if (unicode == NULL)
                return NULL;

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

Reply via email to