GNOME Bugzilla – Bug 375405
Corrupted uudecode output with Pan 0.119 (patch included)
Last modified: 2006-11-17 14:57:52 UTC
Please describe the problem: Due to a couple of bugs in IsKnownHeader()@uulib/uuscan.c, uulib is being passed the headers for decoding. Most of these are detected as invalid lines by UUValidData()@uulib/uunconc.c but it gets tripped up by the Xref header which it thinks is a valid uuencoded line and ends up corrupting the decoded file as a result. The bugs are as follow. 1. The header portion of the line was not terminated by null causing strcmp() fail every time in IsKnownHeader(). 2. IsKnownHeader() was always returning 0 instead of retval. Steps to reproduce: 1. 2. 3. Actual results: Expected results: Does this happen every time? Other information:
Created attachment 76618 [details] [review] Fixes the 2 bugs alluded to in the bug report
Thanks!!
Hi Charles, On closer examination of the code, only the retval part of the patch is needed. I overlooked the fact that the header is copied into another buffer which is null terminated. I have attached another patch. Thanks, Shantanu
Created attachment 76753 [details] [review] uuscan fix try #2
Applied. Thanks again for finding this bug. I feel pretty stupid for having written it. :)