Subject: pkg/23917: mail/sylpheed-gtk2 truncates non-ascii headers
To: None <gnats-bugs@gnats.NetBSD.org>
From: Min Sik Kim <minskim@bawi.org>
List: netbsd-bugs
Date: 12/28/2003 10:21:31
>Number: 23917
>Category: pkg
>Synopsis: mail/sylpheed-gtk2 truncates non-ascii headers
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Dec 28 16:22:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Min Sik Kim
>Release: NetBSD 1.6ZG
>Organization:
>Environment:
>Description:
sylpheed-gtk calls isspace(3) with signed char in src/codeconv.c.
Since the behavior of isspace(3) is undefiend when its argument is
negative, it may return an unexpected result for non-ascii characters.
In fact, it returns a non-zero value for many Korean characters,
resulting in truncated headers. I suspect mail/sylpheed and
mail/sylpheed-claws have the same problem.
I reported this problem to the sylpheed mailing list, but didn't get
any reply yet.
>How-To-Repeat:
>Fix:
Add the following patch and regen distinfo.
$NetBSD$
--- src/codeconv.c.orig 2003-09-06 01:19:31.000000000 -0500
+++ src/codeconv.c
@@ -1475,7 +1475,7 @@ void conv_encode_header(gchar *dest, gin
gint mimestr_len;
gchar *mimesep_enc;
gint left;
- const gchar *srcp = src;
+ const guchar *srcp = src;
gchar *destp = dest;
gboolean use_base64;
@@ -1537,7 +1537,7 @@ void conv_encode_header(gchar *dest, gin
gchar *part_str;
gchar *out_str;
gchar *enc_str;
- const gchar *p = srcp;
+ const guchar *p = srcp;
gint out_str_len;
gint out_enc_str_len;
gint mime_block_len;
>Release-Note:
>Audit-Trail:
>Unformatted:
Environment:
System: NetBSD sulley.infnis.com 1.6ZG NetBSD 1.6ZG (SULLEY) #1: Tue Dec 16 01:53:13 CST 2003 root@sulley.infnis.com:/usr/obj/sys/arch/i386/compile/SULLEY i386
Architecture: i386
Machine: i386