cvs: php-src(PHP_5_2) / NEWS /ext/mbstring/libmbfl/filters mbfilter_cp932.c mbfilter_sjis.c

From: Date: Mon, 16 Feb 2009 01:58:16 +0000
Subject: cvs: php-src(PHP_5_2) / NEWS /ext/mbstring/libmbfl/filters mbfilter_cp932.c mbfilter_sjis.c
Groups: php.cvs 
Request: Send a blank email to [email protected] to get a copy of this message
moriyoshi		Mon Feb 16 01:58:16 2009 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src	NEWS 
    /php-src/ext/mbstring/libmbfl/filters	mbfilter_cp932.c 
                                         	mbfilter_sjis.c 
  Log:
  - MFH: Fix bug #47399 mb_check_encoding() return true for some illegal SJIS
    characrters.
  
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1420&r2=1.2027.2.547.2.1421&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1420 php-src/NEWS:1.2027.2.547.2.1421
--- php-src/NEWS:1.2027.2.547.2.1420	Sun Feb 15 14:31:55 2009
+++ php-src/NEWS	Mon Feb 16 01:58:16 2009
@@ -1,6 +1,8 @@
 PHP                                                                        NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? Feb 2009, PHP 5.2.9
+- Fixed bug #47399 (mb_check_encoding() returns true for some illegal SJIS
+  characters). (for-bugs at hnw dot jp, Moriyoshi)
 - Fixed bug #45923 (mb_st[r]ripos() offset not handled correctly). (Moriyoshi)
 - Fixed bug #43841 (mb_strrpos() offset is byte count for negative values).
   (Moriyoshi)
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/libmbfl/filters/mbfilter_cp932.c?r1=1.1&r2=1.1.8.1&diff_format=u
Index: php-src/ext/mbstring/libmbfl/filters/mbfilter_cp932.c
diff -u php-src/ext/mbstring/libmbfl/filters/mbfilter_cp932.c:1.1
php-src/ext/mbstring/libmbfl/filters/mbfilter_cp932.c:1.1.8.1
--- php-src/ext/mbstring/libmbfl/filters/mbfilter_cp932.c:1.1	Sat Aug 23 06:18:36 2003
+++ php-src/ext/mbstring/libmbfl/filters/mbfilter_cp932.c	Mon Feb 16 01:58:16 2009
@@ -167,7 +167,7 @@
 	case 1:		/* kanji second char */
 		filter->status = 0;
 		c1 = filter->cache;
-		if (c > 0x39 && c < 0xfd && c != 0x7f) {
+		if (c >= 0x40 && c <= 0xfc && c != 0x7f) {
 			w = 0;
 			SJIS_DECODE(c1, c, s1, s2);
 			s = (s1 - 0x21)*94 + s2 - 0x21;
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/libmbfl/filters/mbfilter_sjis.c?r1=1.1&r2=1.1.8.1&diff_format=u
Index: php-src/ext/mbstring/libmbfl/filters/mbfilter_sjis.c
diff -u php-src/ext/mbstring/libmbfl/filters/mbfilter_sjis.c:1.1
php-src/ext/mbstring/libmbfl/filters/mbfilter_sjis.c:1.1.8.1
--- php-src/ext/mbstring/libmbfl/filters/mbfilter_sjis.c:1.1	Sat Aug 23 06:18:36 2003
+++ php-src/ext/mbstring/libmbfl/filters/mbfilter_sjis.c	Mon Feb 16 01:58:16 2009
@@ -167,7 +167,7 @@
 	case 1:		/* kanji second char */
 		filter->status = 0;
 		c1 = filter->cache;
-		if (c > 0x39 && c < 0xfd && c != 0x7f) {
+		if (c >= 0x40 && c <= 0xfc && c != 0x7f) {
 			SJIS_DECODE(c1, c, s1, s2);
 			w = (s1 - 0x21)*94 + s2 - 0x21;
 			if (w >= 0 && w < jisx0208_ucs_table_size) {




Thread (1 message)

  • Moriyoshi Koizumi
« previous php.cvs (#56276) next »