fetchmail-friends
[Top] [All Lists]

header line termination Re: [fetchmail] bug in 6.2.0

2003-03-25 12:01:54
Fetchmail is occasionally core dumping when trying to download certain 
spam messages, preventing me from getting to the more important messages 
behind them (and making it hard to determine that they _are_ spam)

From my preliminary debugging, it appears that the program is getting 
bogged down in the
following loop: 

    /* The line may contain NUL characters. Find the last char to use
     * -- the real line termination is the sequence "\n\0".
     */
    last = buf + 1; /* last[-1] must be valid! */
    while ((last += strlen(last)) && (last[-1] != '\n'))
        last++;

I think I've traced the problem to somewhere inside the readheaders() 
function
in transact.c
I'm looking at the function, and I see this big loop where it gets a line 
from somewhere, does some processing on it, and then appends it to 
msgblk.headers.
Right now, my thinking is that this line is supposed to be terminated by 
"\n\0" before being appended to msgblk.headers, but that isn't happening 
for some reason.
Can anyone confirm/deny that I am correct in my understanding of what is 
supposed to happen?



<Prev in Thread] Current Thread [Next in Thread>