Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 7624 - "rpm -qp[il]" dumps core for non-existant files
Summary: "rpm -qp[il]" dumps core for non-existant files
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 6.1
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-12-06 08:40 UTC by fortytwo
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 1999-12-08 13:06:20 UTC


Attachments (Terms of Use)
possible patch (deleted)
1999-12-06 08:45 UTC, fortytwo
no flags Details | Diff

Description fortytwo 1999-12-06 08:40:54 UTC
If rpm is called with a "-qp" option and given the name of a non-existant
file, it will crash like this:

[fortytwo@manetheren dl]$ rpm -q rpm
rpm-3.0.4-0.1
[fortytwo@manetheren dl]$ rpm --version
RPM version 3.0.4
[fortytwo@manetheren dl]$ rpm -qip feh
open of feh failed: No such file or directory
rpm: rpmio.c:2398: Fclose: Assertion `fd && fd->magic == 0xbeefdead'
failed.
Aborted (core dumped)
[fortytwo@manetheren dl]$

Comment 1 fortytwo 1999-12-06 08:45:59 UTC
Created attachment 32 [details]
possible patch

Comment 2 Jeff Johnson 1999-12-08 13:06:59 UTC
Thanks for the patch. This is already fixed as
            if (fd)
                Fclose(fd);
If you're interested in helping to debug rpm-3.0.4, please check Raw Hide often
for updates as there will be lots of fixes in the next 2-3 weeks.

Otherwise, you're probably better off reverting to the production rpm-3.0.3.


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