From: nasm-bot f. C. G. <gor...@gm...> - 2018-10-14 16:27:18
|
Commit-ID: 980dd658b521afe4a688c4195410c4449a8e2468 Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=980dd658b521afe4a688c4195410c4449a8e2468 Author: Cyrill Gorcunov <gor...@gm...> AuthorDate: Sun, 14 Oct 2018 19:25:32 +0300 Committer: Cyrill Gorcunov <gor...@gm...> CommitDate: Sun, 14 Oct 2018 19:25:32 +0300 preproc: expand_smacro -- Fix nil dereference on error path When error happened earlier we might have a.mac already handled and set to nil. https://bugzilla.nasm.us/show_bug.cgi?id=3392508 Signed-off-by: Cyrill Gorcunov <gor...@gm...> --- asm/preproc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/asm/preproc.c b/asm/preproc.c index 0ceb243..cdf03bc 100644 --- a/asm/preproc.c +++ b/asm/preproc.c @@ -4473,7 +4473,9 @@ again: } if (tline->type == TOK_SMAC_END) { - tline->a.mac->in_progress = false; + /* On error path it might already be dropped */ + if (tline->a.mac) + tline->a.mac->in_progress = false; tline = delete_Token(tline); } else { t = *tail = tline; |