preproc: Fix out of range access in expand mmacro
commit67f2ca2b3fb4e009ef3f7885e848b99e6a81ab29
authorCyrill Gorcunov <gorcunov@gmail.com>
Sat, 13 Oct 2018 16:41:01 +0000 (13 19:41 +0300)
committerCyrill Gorcunov <gorcunov@gmail.com>
Sat, 13 Oct 2018 16:41:01 +0000 (13 19:41 +0300)
tree53f7f0491d2cf3186054f78934ec65e196b319b2
parenta98a84b0d57d057ed7ec8eb401fd69407e709fca
preproc: Fix out of range access in expand mmacro

On specially crafetd malformed input file the params
might be zapped (say due to invalid syntax) so we might
access out of bound having nil dereference in best case.

Note the later code in this helper uses tok_isnt_ helper
which already has similar check.

https://bugzilla.nasm.us/show_bug.cgi?id=3392518

Reported-by: Jordan Zebor <j.zebor@f5.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
asm/preproc.c