Re: slrn hangs on X-Face header - Patch
Thomas Wiegner <[email protected]>
| Newsgroups | gmane.network.slrn.user |
|---|---|
| Organization | Powered by Penguin |
| Message-ID | <20070808145601.GA6299@fliewatuet> |
Hi Folks,
please try this patch. I could reproduce the crash of slrn at least
with the posting Wolfgang mentioned.
(http://groups.google.com/group/mozilla.dev.extensions/msg/53b48c42793b2070?dmode=source)
I was not able to reproduce the crash with the X-face header, but
with this patch slrn did not crash anymore when reading the above
linked posting and the X-face header is now decoded correctly.
I'm not sure if this patch might have any side effects. It's more a
hack than a real solution. Please send me feedback if you run into
some other problems
IMHO all postings were this problems occurred are heavily broken.
Perhaps could someone who is more familiar with the RFCs than me
say if it is allowed to encode 'tabs' and 'end of lines' into quoted
printable?
Cheers,
Thomas
--- src/mime.c 2007-08-07 15:48:05.000000000 +0200
+++ src/mime.c 2007-08-08 16:31:40.000000000 +0200
@@ -303,7 +303,7 @@
int strip_8bit)
{
char *allowed_in_qp = "0123456789ABCDEFabcdef";
- unsigned char ch, mask = 0x0;
+ unsigned char ch;
/*
#ifndef SLRNPULL_CODE
if (strip_8bit && (NULL == Char_Set))
@@ -319,8 +319,10 @@
&& (NULL != slrn_strchr (allowed_in_qp, src[1])))
{
ch = (16 * HEX(src[0])) + HEX(src[1]);
- if (ch & mask) ch = '?';
- *dest++ = (char) ch;
+ if(ch != 0x0a && ch != 0x09)
+ {
+ *dest++ = (char) ch;
+ }
src += 2;
}
else if ((ch == '_') && treat_underscore_as_space)
--
slrn charset patches: http://www.foory.de/thw/slrn/
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/