parser: Check for eval error before memory reference parsing

If there is an error in evaluate() happened then @value
is NULL so that we better fail with error report instead
of trying processing it.

http://bugzilla.nasm.us/show_bug.cgi?id=3392290

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
Cyrill Gorcunov 2014-11-22 18:20:29 +03:00
parent e184c0b0cb
commit 5c0b082c92

View file

@ -900,6 +900,8 @@ is_expression:
value = evaluate(stdscan, NULL, &tokval, &op->opflags,
critical, nasm_error, &hints);
i = tokval.t_type;
if (!value)
goto fail;
if (parse_mref(&o2, value))
goto fail;