moriyoshi Fri Oct 25 05:36:36 2002 EDT
Modified files:
/php4/ext/mbstring mbstring.c
Log:
Fixed null value check in php_mb_mbchar_bytes_ex() as it should be
Index: php4/ext/mbstring/mbstring.c
diff -u php4/ext/mbstring/mbstring.c:1.122 php4/ext/mbstring/mbstring.c:1.123
--- php4/ext/mbstring/mbstring.c:1.122 Fri Oct 25 04:31:27 2002
+++ php4/ext/mbstring/mbstring.c Fri Oct 25 05:36:36 2002
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mbstring.c,v 1.122 2002/10/25 08:31:27 moriyoshi Exp $ */
+/* $Id: mbstring.c,v 1.123 2002/10/25 09:36:36 moriyoshi Exp $ */
/*
* PHP4 Multibyte String module "mbstring" (currently only for Japanese)
@@ -3451,7 +3451,7 @@
if (enc != NULL) {
if(enc->flag & MBFL_ENCTYPE_MBCS) {
if(enc->mblen_table != NULL) {
- if (*s != '\0') return enc->mblen_table[*(unsigned
char *)s];
+ if (s != NULL) return enc->mblen_table[*(unsigned char
+*)s];
}
} else if (enc->flag & (MBFL_ENCTYPE_WCS2BE | MBFL_ENCTYPE_WCS2LE)) {
return 2;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php