From ebc5ce969dcda6930b50f0685ea4eb35ea356ad6 Mon Sep 17 00:00:00 2001 From: jdolecek Date: Sun, 16 Oct 2005 12:17:47 +0000 Subject: Fix bug in mbstring extension function mb_encode_mimeheader(), which misinterpreted some Japanese characters as ASCII. PR: 31223 by Takahiro Kambe --- lang/php5/distinfo | 3 ++- lang/php5/patches/patch-an | 13 +++++++++++++ misc/php-mbstring/Makefile | 5 +++-- www/php4/distinfo | 3 ++- www/php4/patches/patch-an | 13 +++++++++++++ 5 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 lang/php5/patches/patch-an create mode 100644 www/php4/patches/patch-an diff --git a/lang/php5/distinfo b/lang/php5/distinfo index fd69825879f..4cb6dff6ecc 100644 --- a/lang/php5/distinfo +++ b/lang/php5/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.9 2005/10/07 21:09:28 jdolecek Exp $ +$NetBSD: distinfo,v 1.10 2005/10/16 12:17:47 jdolecek Exp $ SHA1 (php-5.0.5.tar.bz2) = ffcc050f879265eb96f2c8dc79fa895047da9d4a RMD160 (php-5.0.5.tar.bz2) = 6a9a892affba229770154407860cd1c2a098eaf9 @@ -7,3 +7,4 @@ SHA1 (patch-aj) = cc68ce876dc5998becbe2f1f74288b5da5bbaca3 SHA1 (patch-ak) = 0faa523103e0a9a3c01c78c2fe9a64c0a9b2fc43 SHA1 (patch-al) = 28ad9006b387e2b9984ad49beea21c9d46e63b46 SHA1 (patch-am) = 0de0be745262c1e986062c7a50261dbe58f97ac9 +SHA1 (patch-an) = dfe696f416ab5deffd38150441a65246a4816cf4 diff --git a/lang/php5/patches/patch-an b/lang/php5/patches/patch-an new file mode 100644 index 00000000000..e708f67cab6 --- /dev/null +++ b/lang/php5/patches/patch-an @@ -0,0 +1,13 @@ +$NetBSD: patch-an,v 1.1 2005/10/16 12:17:47 jdolecek Exp $ + +--- ext/mbstring/libmbfl/mbfl/mbfilter.c.orig 2005-10-16 14:09:17.000000000 +0200 ++++ ext/mbstring/libmbfl/mbfl/mbfilter.c 2005-10-16 14:09:21.000000000 +0200 +@@ -1990,7 +1990,7 @@ + break; + + default: /* ASCII */ +- if (!qp_table[(c & 0xff)]) { /* ordinary characters */ ++ if (c >= 0 && c < 0x100 && !qp_table[(c & 0xff)]) { /* ordinary characters */ + mbfl_memory_device_output(c, &pe->tmpdev); + pe->status1 = 1; + } else if (pe->status1 == 0 && c == 0x20) { /* repeat SPACE */ diff --git a/misc/php-mbstring/Makefile b/misc/php-mbstring/Makefile index 719f7c08223..ff271791801 100644 --- a/misc/php-mbstring/Makefile +++ b/misc/php-mbstring/Makefile @@ -1,10 +1,11 @@ -# $NetBSD: Makefile,v 1.4 2005/04/11 21:46:39 tv Exp $ +# $NetBSD: Makefile,v 1.5 2005/10/16 12:17:47 jdolecek Exp $ MODNAME= mbstring CATEGORIES+= misc -PKGREVISION= # empty +PKGREVISION= 1 COMMENT= PHP extension for multibyte characters support (currently, Japanese only) +USE_PHP_EXT_PATCHES= yes CONFIGURE_ARGS+= --enable-${MODNAME}=shared,${BUILDLINK_DIR} diff --git a/www/php4/distinfo b/www/php4/distinfo index b57a12850a8..2c4ae6216d6 100644 --- a/www/php4/distinfo +++ b/www/php4/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.45 2005/10/07 21:09:27 jdolecek Exp $ +$NetBSD: distinfo,v 1.46 2005/10/16 12:17:47 jdolecek Exp $ SHA1 (php-4.4.0.tar.bz2) = 5e0afe6e5f8c751f880a50ad4fa1716f0242ef37 RMD160 (php-4.4.0.tar.bz2) = 4792e78b6f2f3e3347a1ac945b48efaccedf4542 @@ -16,3 +16,4 @@ SHA1 (patch-aj) = cc68ce876dc5998becbe2f1f74288b5da5bbaca3 SHA1 (patch-ak) = 1f9fbe26c7329e1d18eec053499ee2d574b5b970 SHA1 (patch-al) = 28ad9006b387e2b9984ad49beea21c9d46e63b46 SHA1 (patch-am) = 0de0be745262c1e986062c7a50261dbe58f97ac9 +SHA1 (patch-an) = dfe696f416ab5deffd38150441a65246a4816cf4 diff --git a/www/php4/patches/patch-an b/www/php4/patches/patch-an new file mode 100644 index 00000000000..e708f67cab6 --- /dev/null +++ b/www/php4/patches/patch-an @@ -0,0 +1,13 @@ +$NetBSD: patch-an,v 1.1 2005/10/16 12:17:47 jdolecek Exp $ + +--- ext/mbstring/libmbfl/mbfl/mbfilter.c.orig 2005-10-16 14:09:17.000000000 +0200 ++++ ext/mbstring/libmbfl/mbfl/mbfilter.c 2005-10-16 14:09:21.000000000 +0200 +@@ -1990,7 +1990,7 @@ + break; + + default: /* ASCII */ +- if (!qp_table[(c & 0xff)]) { /* ordinary characters */ ++ if (c >= 0 && c < 0x100 && !qp_table[(c & 0xff)]) { /* ordinary characters */ + mbfl_memory_device_output(c, &pe->tmpdev); + pe->status1 = 1; + } else if (pe->status1 == 0 && c == 0x20) { /* repeat SPACE */ -- cgit v1.2.3