[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-mailutils] Re: How get_attachment_name from multiline Content-
From: |
Kostik |
Subject: |
Re: [bug-mailutils] Re: How get_attachment_name from multiline Content-Disposition? |
Date: |
Thu, 08 Apr 2010 12:31:22 +0400 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.24) Gecko/20100228 Thunderbird/2.0.0.24 Mnenhy/0.7.6.0 |
Kostik wrote:
>> Nope. I've forgotten to inform you (or, better said, supposed
>> you to have paid attention to the ChangeLog, alias git log. It's a rule
>> of thumb now, that you've cloned the repo): use
>> mu_message_aget_decoded_attachment_name, which does all the dirty
>> work for you. E.g.:
Sergey, mu_message_aget_decoded_attachment_name() works well, but
"segmentation fault" for filename*0*, filename*1*,... from my previous
examples.
gdb backtrace:
---
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb7e6db90 (LWP 31000)]
0xb7ed88a3 in malloc_consolidate () from /lib/libc.so.6
(gdb) bt
#0 0xb7ed88a3 in malloc_consolidate () from /lib/libc.so.6
#1 0xb7eda363 in _int_free () from /lib/libc.so.6
#2 0xb7ede010 in free () from /lib/libc.so.6
#3 0x08057334 in _get_attachment_name (msg=<value optimized out>,
buf=0x8cf0d58 "attachment;
filename*0*=UTF-8''%D0%A1%D0%B2%D0%B5%D0%B4%D0%B5%D0%BD%D0%B8%D1%8F%20%D0;
filename*1*=%BF%D0%BE%20%D0%BF%D0%B0%D0%B2%D0%B0%D0%B4%D0%BA%D1%83%20%D0;
filename*2*=%B3%2E%20%D0%9A%D0%B8%D1%81"..., bufsz=3086713120,
pbuf=0xb7e6b7c0, sz=0x0, pflags=0xb7e6b7bc) at mimehdr.c:564
#4 0x08057478 in mu_message_aget_decoded_attachment_name (msg=0x8ce7bb0,
charset=0x807750c "UTF-8", pval=0xb7e6b9f4, plang=0x0) at mimehdr.c:599
---
It is here (mimehdr.c):
---
/* If the header wasn't there, we'll fall back to Content-Type, but
other errors are fatal. */
if (ret != 0 && ret != MU_ERR_NOENT)
return ret;
if (ret == 0 && value != NULL)
{
ret = _header_get_param (value, "attachment",
"filename", buf, bufsz, pbuf, sz, pflags);
!!!-> free (value); <- faulted free()
value = NULL;
if (ret == 0 || ret != MU_ERR_NOENT)
return ret;
}
---
=kostik
- Re: [bug-mailutils] Re: How get_attachment_name from multiline Content-Disposition?, (continued)
- Re: [bug-mailutils] Re: How get_attachment_name from multiline Content-Disposition?, Sergey Poznyakoff, 2010/04/07
- Re: [bug-mailutils] Re: How get_attachment_name from multiline Content-Disposition?, Kostik, 2010/04/07
- Re: [bug-mailutils] Re: How get_attachment_name from multiline Content-Disposition?, Sergey Poznyakoff, 2010/04/07
- Re: [bug-mailutils] Re: How get_attachment_name from multiline Content-Disposition?, Kostik, 2010/04/07
- Re: [bug-mailutils] Re: How get_attachment_name from multiline Content-Disposition?, Sergey Poznyakoff, 2010/04/07
- Re: [bug-mailutils] Re: How get_attachment_name from multiline Content-Disposition?, Sergey Poznyakoff, 2010/04/08
- Re: [bug-mailutils] Re: How get_attachment_name from multiline Content-Disposition?, Kostik, 2010/04/08
- Re: [bug-mailutils] Re: How get_attachment_name from multiline Content-Disposition?, Sergey Poznyakoff, 2010/04/08
- Re: [bug-mailutils] Re: How get_attachment_name from multiline Content-Disposition?, Kostik, 2010/04/08
- Re: [bug-mailutils] Re: How get_attachment_name from multiline Content-Disposition?, Sergey Poznyakoff, 2010/04/08
- Re: [bug-mailutils] Re: How get_attachment_name from multiline Content-Disposition?,
Kostik <=
- Re: [bug-mailutils] Re: How get_attachment_name from multiline Content-Disposition?, Sergey Poznyakoff, 2010/04/08
- Re: [bug-mailutils] Re: How get_attachment_name from multiline Content-Disposition?, Kostik, 2010/04/08
- Re: [bug-mailutils] Re: How get_attachment_name from multiline Content-Disposition?, Sergey Poznyakoff, 2010/04/08