[pkg-fetchmail-maint] Bug#348747: fetchmail: segfault when submitting dsn to local postmaster

Matthias Andree matthias.andree at gmx.de
Thu Jan 19 02:33:27 UTC 2006


"Nathaniel W. Turner" <nate at houseofnate.net> writes:

> After upgrading to 6.3.1-4, fetchmail dies with a segmentation fault
> after trying to process the first message.  The transcript of the
> session, a sanitized fetchmailrc, and the message in question are
> attached to this report.

Thank you for the bug report. It turns out the closer circumstances of
the bounce wouldn't matter; valgrind quickly pinpointed the bug to a
bogus free() call.

I broke this when I removed alloca() and added the necessary free()
code. My code tried to decrement a pointer address before dereferencing,
rather than decrementing the dereferenced pointer; this resulted in
frequent segfaults on machines that support unaligned access and bus
errors on those that don't (SPARC). Turns out the fix is rather simple.

(Attached.)

Note the patch has had little testing (it fixes the immediate valgrind
problem and looks less stupid). Please test and report.

Kind regards,

-- 
Matthias Andree
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug348747.patch
Type: text/x-patch
Size: 1638 bytes
Desc: fix segfault after bounce in fetchmail >= 6.3.0
Url : http://lists.alioth.debian.org/pipermail/pkg-fetchmail-maint/attachments/20060119/23316414/bug348747.bin


More information about the pkg-fetchmail-maint mailing list