NetBSD Problem Report #31223

From taca@back-street.net  Thu Sep  8 15:41:54 2005
Return-Path: <taca@back-street.net>
Received: from ns.back-street.net (221x250x131x194.ap221.ftth.ucom.ne.jp [221.250.131.194])
	by narn.netbsd.org (Postfix) with ESMTP id 7F2CB63B87B
	for <gnats-bugs@gnats.NetBSD.org>; Thu,  8 Sep 2005 15:41:54 +0000 (UTC)
Message-Id: <20050908154150.5872F375CB@reef.back-street.net>
Date: Fri,  9 Sep 2005 00:41:50 +0900 (JST)
From: taca@back-street.net
Reply-To: taca@back-street.net
To: gnats-bugs@netbsd.org
Subject: php-mbstring's may misinterpretation problem
X-Send-Pr-Version: 3.95

>Number:         31223
>Category:       pkg
>Synopsis:       php-mbstring's may misinterpretation problem
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    jdolecek
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Sep 08 15:42:00 +0000 2005
>Closed-Date:    Sun Oct 16 12:18:58 +0000 2005
>Last-Modified:  Sun Oct 16 12:18:58 +0000 2005
>Originator:     Takahiro Kambe
>Release:        NetBSD 3.99.8
>Organization:
Takahiro Kambe
>Environment:


System: NetBSD reef.back-street.net 3.99.8 NetBSD 3.99.8 (CF-R3E) #1: Mon Aug 22 22:27:15 JST 2005 taca@reef.back-street.net:/data/i386/obj/sys/arch/i386/compile/CF-R3E i386
Architecture: i386
Machine: i386
>Description:
	php-mbstring's mb_encode_mimeheader() has critial problem which
	misinterpret Japanese string as US-ASCII string in some case.
>How-To-Repeat:
	Use ja-squirrelmail and use Japanese in subject.
>Fix:
	Please add this patch.


$NetBSD$

--- libmbfl/mbfl/mbfilter.c.orig	2005-04-22 14:03:38.000000000 +0900
+++ libmbfl/mbfl/mbfilter.c
@@ -1990,7 +1990,7 @@ mime_header_encoder_collector(int c, voi
 		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 */

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->jdolecek
Responsible-Changed-By: jdolecek@netbsd.org
Responsible-Changed-When: Sun, 16 Oct 2005 12:18:58 +0000
Responsible-Changed-Why:
I'm responsible for PHP packages.


State-Changed-From-To: open->closed
State-Changed-By: jdolecek@netbsd.org
State-Changed-When: Sun, 16 Oct 2005 12:18:58 +0000
State-Changed-Why:
Patch applied, thank you.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.