Bug 76718 - rpm w/custom queryformat segfaults
rpm w/custom queryformat segfaults
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
8.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-10-25 09:56 EDT by Preston Brown
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-10-25 10:16:24 EDT
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 Preston Brown 2002-10-25 09:56:32 EDT
Description of Problem:

rpm -qa --queryformat "%-70{FILENAMES}\t%{FILEMD5S}\n"

produces a segfault.

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

4.1-1.06

How Reproducible:

always.

Jeff says may be related to #16617.
Comment 1 Jeff Johnson 2002-10-25 09:58:54 EDT
Reproduced, fix shortly.
Comment 2 Jeff Johnson 2002-10-25 10:16:18 EDT
Segfault is on /dev/initctl, which doesn't have MD5 sum.
Comment 3 Jeff Johnson 2002-10-25 10:44:20 EDT
AFAICT /dev/initctl (or other pipe) is the
only problem, fix is

Index: rpmdb/header.c
===================================================================
RCS file: /cvs/devel/rpm/rpmdb/header.c,v
retrieving revision 1.27
diff -u -r1.27 header.c
--- rpmdb/header.c      17 Sep 2002 15:21:04 -0000      1.27
+++ rpmdb/header.c      25 Oct 2002 14:42:10 -0000
@@ -2825,6 +2825,7 @@
     }
     
     /*@-branchstate@*/
+    if (data)
     switch (type) {
     case RPM_STRING_ARRAY_TYPE:
        strarray = (const char **)data;

in rpm-4.2.

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