[Commits] [SCM] claws branch, master, updated. 3.11.1-26-g00cade7

mones at claws-mail.org mones at claws-mail.org
Mon Nov 17 21:31:18 CET 2014


The branch, master has been updated
       via  00cade792bc7ee9059cc43c70376d5877b12bd73 (commit)
      from  278a5b047584d153cab765bacdf73cbcb795d4a0 (commit)

Summary of changes:
 src/unmime.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


- Log -----------------------------------------------------------------
commit 00cade792bc7ee9059cc43c70376d5877b12bd73
Author: Ricardo Mones <ricardo at mones.org>
Date:   Mon Nov 17 21:28:28 2014 +0100

    Fix address out of bounds crash while decoding mails
    
    For reference last stack frame:
    
    Program received signal SIGSEGV, Segmentation fault.
    0x00007ffff1e820ca in ?? () from /lib/x86_64-linux-gnu/libc.so.6
    (gdb) bt full
    No symbol table info available.
        encoded_str=0x7fffffff23e6 "=?UTF-8?B?RGF2aWQgUHLDqXZvdA==?= <david at tilapin.org>", addr_field=1) at unmime.c:135
            decoded_text = 0xffffffffcdd6a0c0 <Address 0xffffffffcdd6a0c0 out of bounds>
            quote_p = 0x0
            len = 5
            p = 0x7fffffff23e6 "=?UTF-8?B?RGF2aWQgUHLDqXZvdA==?= <david at tilapin.org>"
            eword_begin_p = 0x7fffffff23e6 "=?UTF-8?B?RGF2aWQgUHLDqXZvdA==?= <david at tilapin.org>"
            encoding_begin_p = 0x7fffffff23ed "?B?RGF2aWQgUHLDqXZvdA==?= <david at tilapin.org>"
            text_begin_p = 0x7fffffff23ef "?RGF2aWQgUHLDqXZvdA==?= <david at tilapin.org>"
            eword_end_p = 0x7fffffff2404 "?= <david at tilapin.org>"
            charset = "UTF-8", '\000' <repeats 19 times>, "\001\000\000\000\000\000\000"
            encoding = 66 'B'
            conv_str = 0x7fffcdd6a730 "\003"
            outbuf = 0xe45380
            out_str = 0x7fffcdd60e50 "E1Xq7ru-0002EK-Ro at franck.debian.org"
            out_len = 13
            in_quote = 0

diff --git a/src/unmime.c b/src/unmime.c
index 9848977..e9588e3 100644
--- a/src/unmime.c
+++ b/src/unmime.c
@@ -113,7 +113,7 @@ gchar *unmime_header(const gchar *encoded_str, gboolean addr_field)
 		if (encoding == 'B') {
 			gchar *tmp;
 			tmp = g_strndup(text_begin_p + 1, eword_end_p - (text_begin_p + 1) + 1);
-			decoded_text = g_base64_decode_zero(tmp, &out_len);
+			decoded_text = g_base64_decode(tmp, &out_len);
 			g_free(tmp);
 		} else if (encoding == 'Q') {
 			decoded_text = g_malloc

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list