Bug 9581 - %{!?FOO:} macro causes SIGSEGV
Summary: %{!?FOO:} macro causes SIGSEGV
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 6.2
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
URL: http://www.kondara.org
Whiteboard:
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:
Clone Of:
Environment:
Last Closed: 2000-02-21 10:22:39 UTC
Embargoed:


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.