preproc: Fix in accessing the definition structure of a single-line macro
commitc52aff4cc8680e404cce1cc2a183b7015f07be08
authorChang S. Bae <chang.seok.bae@intel.com>
Mon, 20 Apr 2020 21:43:44 +0000 (20 21:43 +0000)
committerChang S. Bae <chang.seok.bae@intel.com>
Tue, 21 Apr 2020 21:41:33 +0000 (21 21:41 +0000)
treefddbbb94bca7e594878a6f90b0ad4f8ac5dd8f1e
parent5f8d0ec1f6487fb7a2520b1c81292f2242acb01c
preproc: Fix in accessing the definition structure of a single-line macro

Determining whether we should warn on defining a single-line macro, with a
name and a certain number of parameters, call a helper function,
smacro_defined(). It does not always return the address of the definition
structure.

Fix the code to be cautiously accessing the definition structure.

Fixes: e91f5cc1322e ("preproc: fix %undef of macro aliases, and add
%ifdefalias")

Reported-by: Dale Curtis <dalecurtis@chromium.org>
Link: https://bugzilla.nasm.us/show_bug.cgi?id=3392659
Signed-off-by: Chang S. Bae <chang.seok.bae@intel.com>
asm/preproc.c