Bug 9581 - %{!?FOO:} macro causes SIGSEGV
Summary: %{!?FOO:} macro causes SIGSEGV
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm   
(Show other bugs)
Version: 6.2
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
URL: http://www.kondara.org
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-02-19 04:20 UTC by Motonobu Ichimura
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-02-21 10:22:39 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 Motonobu Ichimura 2000-02-19 04:20:41 UTC
when %{!?FOO:} macro is in spec file, rpm causes SIGSEGV.

%{!?FOO: bar} ->OK
%{!?FOO:} ->NG
#{!?FOO:} ->NG  (even in comment)

this patch applied, rpm may work correctly.

--- rpm-3.0.4/lib/macro.c.orig  Sat Feb 19 12:16:29 2000
+++ rpm-3.0.4/lib/macro.c       Sat Feb 19 02:39:08 2000
@@ -1116,7 +1116,7 @@
                if (g && g < ge) {              /* Expand X in %{?f:X} */
                        rc = expandT(mb, g, gn);
                } else
-               if (me->body && *me->body) {    /* Expand %{?f}/%{?f*} */
+               if (me != NULL && me->body && *me->body) {      /* Expand
%{?f}/%{?f*} */
                        rc = expandT(mb, me->body, strlen(me->body));
                }
                s = se;

Comment 1 Jeff Johnson 2000-02-21 10:22:59 UTC
Checked in, will be in rpm-3.0.4-0.44. Thanks for the patch.


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