summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChang S. Bae <chang.seok.bae@intel.com>2020-03-25 15:13:21 -0700
committerChang S. Bae <chang.seok.bae@intel.com>2020-04-21 21:12:01 +0000
commit7ee58d44e4df3f3097b9475dd0aafedecd428abd (patch)
tree97667d3ad625899c202cb025ed7f1dd121ad090d
parent0197c966da91cc2cecc0884ccaf332aa81b32deb (diff)
downloadnasm-7ee58d44e4df3f3097b9475dd0aafedecd428abd.tar.gz
preproc: Fix the token in expanding the macro-parameters
The code looked to be unintentionally always nullifying the token pointer at first place in handling those macro-parameters. Remove it to avoid segfault. Fixes: de7acc3a46cb ("preproc: defer %00, %? and %?? expansion for nested macros, cleanups") Reported-by: C. Masloch <pushbx@ulukai.org> Link: https://bugzilla.nasm.us/show_bug.cgi?id=3392640 Signed-off-by: Chang S. Bae <chang.seok.bae@intel.com>
-rw-r--r--asm/preproc.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/asm/preproc.c b/asm/preproc.c
index befe77e8..cf770026 100644
--- a/asm/preproc.c
+++ b/asm/preproc.c
@@ -4833,8 +4833,6 @@ static Token *expand_mmac_params(Token * tline)
unsigned long n;
char *ep;
- text = NULL;
-
n = strtoul(tok_text(t) + 2, &ep, 10);
if (unlikely(*ep))
goto invalid;