Avoid segfault on malformed %{!?FOO:} expansion (#9581).
CVS patchset: 3571 CVS date: 2000/02/21 10:32:01
This commit is contained in:
parent
8feebaf110
commit
7b1e9c5a02
|
@ -1116,7 +1116,7 @@ expandMacro(MacroBuf *mb)
|
|||
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 && me->body && *me->body) { /* Expand %{?f}/%{?f*} */
|
||||
rc = expandT(mb, me->body, strlen(me->body));
|
||||
}
|
||||
s = se;
|
||||
|
|
|
@ -1116,7 +1116,7 @@ expandMacro(MacroBuf *mb)
|
|||
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 && me->body && *me->body) { /* Expand %{?f}/%{?f*} */
|
||||
rc = expandT(mb, me->body, strlen(me->body));
|
||||
}
|
||||
s = se;
|
||||
|
|
Loading…
Reference in New Issue