Bug 31976 - rpm-4.0 --queryformat segmentation fault
rpm-4.0 --queryformat segmentation fault
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
7.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-03-16 03:34 EST by Need Real Name
Modified: 2007-04-18 12:32 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-01-03 09:06:35 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2001-03-16 03:34:33 EST
Searched the bugs database.  Didn't see bug reports that were obviously quite like this.

Looked for updates to RPM and didn't see any listed under Red Hat Linux 7.0

With RPM 4.0 in a non-updated, stock installation running on a consumer P100, the following command:

	rpm -qp "${package}" --queryformat '[%{DIRINDEXES}\t%{DIRNAMES}\n]\n'

causes the following error message to be printed:

	Segmentation fault (core dumped)

while this command does not:

	rpm -qp "${package}" --queryformat '[%{DIRNAMES}\t%{DIRINDEXES}\n]\n'

and neither does this:

	rpm -qp "${package}" --queryformat '[%{DIRINDEXES}\n]\n'
Comment 1 Jeff Johnson 2001-03-18 08:54:34 EST
What's happening is that the '[' array iterator expects tags for identically
sized arrays,
that's not the case with DIRINDEXES (no. of files) and DIRNAMES (no of dirs).

The fix is going to be to detect different sized arrays and print an error.
Comment 2 Jeff Johnson 2003-01-03 09:06:35 EST
Fixed in rpm-4.2-0.49

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