Bug 123650 - [PATCH] b64encode() doesn't like leading NUL (was 'tgpg' fails to check some packages)
Summary: [PATCH] b64encode() doesn't like leading NUL (was 'tgpg' fails to check some ...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: beecrypt
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Paul Nasrat
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks: FC3Target FC4Target
TreeView+ depends on / blocked
 
Reported: 2004-05-19 20:09 UTC by Enrico Scholz
Modified: 2007-11-30 22:10 UTC (History)
3 users (show)

Fixed In Version: 4.1.2-7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-05-17 18:36:46 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Don't return "" for binary data starting with NUL (335 bytes, patch)
2005-04-26 20:10 UTC, Miloslav Trmač
no flags Details | Diff

Description Enrico Scholz 2004-05-19 20:09:06 UTC
Description of problem:

http://download.fedora.us/fedora/fedora/2/i386/RPMS.stable/lzo-1.08-0.fdr.2.2.i386.rpm
is signed correctly, but 'tgpg' fails because of a malformed CRC.

| # wget http://www.fedora.us/FEDORA-GPG-KEY
| # rpm --import FEDORA-GPG-KEY
| # gpg --import FEDORA-GPG-KEY
| # wget http://download.fedora.us/fedora/fedora/2/i386/RPMS.stable/lzo-1.08-0.fdr.2.2.i386.rpm
| # rpm -K lzo-1.08-0.fdr.2.2.i386.rpm
| lzo-1.08-0.fdr.2.2.i386.rpm: (sha1) dsa sha1 md5 gpg OK
| 
| # /usr/lib/rpm/tgpg lzo-1.08-0.fdr.2.2.i386.rpm 
| ...
| gpg: malformed CRC
| ...

I know some other rpms also:
2-stable/i386/graphviz-1.10-0.fdr.3.2.i386.rpm
2-stable/i386/lzo-1.08-0.fdr.2.2.i386.rpm
2-stable/i386/nethack-falconseye-1.9.4-0.fdr.4.a.1.90.i386.rpm


Btw, it would be nice when 'tgpg' could be used in scripts. E.g. be
more quietly and return a meaningful return code.



Version-Release number of selected component (if applicable):

rpm-4.3.1-0.3

Comment 1 Matthew Miller 2005-04-26 16:00:01 UTC
Fedora Core 2 is now maintained by the Fedora Legacy project for
security updates only. If this problem is a security issue, please
reopen and reassign to the Fedora Legacy product. If it is not a
security issue and hasn't been resolved in the current FC3 updates or
in the FC4 test release, reopen and change the version to match.

Comment 2 Miloslav Trmač 2005-04-26 20:06:46 UTC
gnupg-1.4.1-1 handles the rpm armored output correctly,
but that looks like the two bugs cancelling each other.

The RPM output doesn't seem to be a valid ASCII armor,
beecrypt's fault.

Comment 3 Miloslav Trmač 2005-04-26 20:10:56 UTC
Created attachment 113689 [details]
Don't return "" for binary data starting with NUL

The attached patch (I'll send it upstream shortly) fixes b64encode().
The check for "" is invalid for binary data.  For NUL-terminated
data it is superfluous, the function does the right thing for zero-length
data anyway.

Paul, if you want me to build an updated package, just yell.

Comment 4 Paul Nasrat 2005-05-17 17:15:07 UTC
Mitr - if you could build a beecrypt with this in that'd be great.

Thanks


Note You need to log in before you can comment on or make changes to this bug.