After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 375405 - Corrupted uudecode output with Pan 0.119 (patch included)
Corrupted uudecode output with Pan 0.119 (patch included)
Status: RESOLVED FIXED
Product: Pan
Classification: Other
Component: general
pre-1.0 betas
Other All
: Normal major
: 1.0
Assigned To: Charles Kerr
Pan QA Team
Depends on:
Blocks:
 
 
Reported: 2006-11-15 04:31 UTC by Shantanu Goel
Modified: 2006-11-17 14:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fixes the 2 bugs alluded to in the bug report (749 bytes, patch)
2006-11-15 04:33 UTC, Shantanu Goel
none Details | Review
uuscan fix try #2 (200 bytes, patch)
2006-11-17 12:16 UTC, Shantanu Goel
none Details | Review

Description Shantanu Goel 2006-11-15 04:31:18 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:
Comment 1 Shantanu Goel 2006-11-15 04:33:26 UTC
Created attachment 76618 [details] [review]
Fixes the 2 bugs alluded to in the bug report
Comment 2 Charles Kerr 2006-11-16 21:25:29 UTC
Thanks!!
Comment 3 Shantanu Goel 2006-11-17 12:12:41 UTC
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
Comment 4 Shantanu Goel 2006-11-17 12:16:27 UTC
Created attachment 76753 [details] [review]
uuscan fix try #2
Comment 5 Charles Kerr 2006-11-17 14:57:52 UTC
Applied.  Thanks again for finding this bug.
I feel pretty stupid for having written it. :)