Bug 76718 - rpm w/custom queryformat segfaults
Summary: rpm w/custom queryformat segfaults
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 8.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-10-25 13:56 UTC by Preston Brown
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-10-25 14:16:24 UTC


Attachments (Terms of Use)

Description Preston Brown 2002-10-25 13:56:32 UTC
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 13:58:54 UTC
Reproduced, fix shortly.

Comment 2 Jeff Johnson 2002-10-25 14:16:18 UTC
Segfault is on /dev/initctl, which doesn't have MD5 sum.


Comment 3 Jeff Johnson 2002-10-25 14:44:20 UTC
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.