Bug 31976 - rpm-4.0 --queryformat segmentation fault
Summary: rpm-4.0 --queryformat segmentation fault
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm   
(Show other bugs)
Version: 7.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-03-16 08:34 UTC by Need Real Name
Modified: 2007-04-18 16:32 UTC (History)
0 users

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


Attachments (Terms of Use)

Description Need Real Name 2001-03-16 08:34:33 UTC
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 13:54:34 UTC
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 14:06:35 UTC
Fixed in rpm-4.2-0.49


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