pan-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Pan-users] Segfaults from recent pan2.git [crap, NOTSOLVED]


From: walt
Subject: Re: [Pan-users] Segfaults from recent pan2.git [crap, NOTSOLVED]
Date: Wed, 19 Feb 2014 17:20:06 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

On 02/19/2014 03:51 PM, Rhialto wrote:
> On Tue 18 Feb 2014 at 16:01:04 -0800, walt wrote:
>> My theory ATM is that there are at least two different bugs bugging me :)
>>
>> The crash caused by the article above *may* be fixed by the change below:
>>
>> diff --git a/pan/data/article-cache.cc b/pan/data/article-cache.cc
>> index 0ac3d57..537504e 100644
>> --- a/pan/data/article-cache.cc
>> +++ b/pan/data/article-cache.cc
>> @@ -117,7 +117,6 @@ ArticleCache :: message_id_to_filename (char * buf, int 
>> len, const StringView& m
>>             break;
>>          case '<': case '>': /* these are illegal too, but rather than 
>> encoding
>>                                 them, follow the convention of omitting them 
>> */
>> -           break;
>>          default:
>>             *out++ = *in;
>>             break;
> 
> Looking at the surrounding code, it seems rather implausible to me that
> removing that "break" would prevent a crash somehow. The reverse, in
> fact.  Without the break, the characters '<' and '>' when encountered in
> a message ID (and they surround it, so I presume this function will see
> them) will be copied into the output buffer which is used for a cache
> (?) file name. With the break, they are omitted. And if that buffer is
> exactly the right size for the name without those characters, then with
> the 'break' omitted it may overflow.
> 
> Note that I have only looked at this bit of code in its context of the
> function in file article-cache.cc, and no more. So it could be wrong.
> (I may have been in a comment I wrote about some other software,
> elsewhere, so I'm going to be a bit more cautions here ;-)
> 
> Note that on Unix you can perfectly well have files with < and > in
> them, but not on MSWindows. On Unix, the only 2 things you can't have
> are '/' and '\0' (although lots of characters may cause difficulties for
> the users).

Hi Olaf, and thanks for taking the time to inspect the code.  I should
add that I didn't come up with that patch based on my brilliant coding
skills :)

What I'm doing is inspecting Heinrich's commit

commit 35bf10f456956da19a39d5b5d8bbf3f84dffcb80
Author: Heinrich Müller <address@hidden>
Date:   Wed Nov 20 21:19:00 2013 +0100

    cleanup of experimental code

and looking for anything that seems likely to cause crashes, because I've
seen no crashes from any pan.git version prior to that commit (except for
the one specific article Duncan cited).

I'd really love for talented people (like you) to try "Duncan's article"
before and after applying my proposed patch and report the results.

Thanks!





reply via email to

[Prev in Thread] Current Thread [Next in Thread]