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-01 15:42:16 -0700
commit6e3f3411a1686e554beca3e766edb0a8efb6d617 (patch)
treef643a5944f26cbc65bded31332cbab2465ed1e29
parent53ca4bb19cc4f3147891c03d10959d57e0edcc01 (diff)
downloadnasm-6e3f3411a1686e554beca3e766edb0a8efb6d617.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;