Bug 9581 - %{!?FOO:} macro causes SIGSEGV
%{!?FOO:} macro causes SIGSEGV
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
6.2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
http://www.kondara.org
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-02-18 23:20 EST by Motonobu Ichimura
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-02-21 05:22:39 EST
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 Motonobu Ichimura 2000-02-18 23:20:41 EST
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 05:22:59 EST
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.