summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2014-11-22 18:20:29 +0300
committerCyrill Gorcunov <gorcunov@gmail.com>2014-11-22 18:20:29 +0300
commit5c0b082c9289d78577168ad7eaf13b56c58deb5c (patch)
tree775895c08dceed3379286cbc817b24cdb881b536
parente184c0b0cb8c886428975a406f20893696651ede (diff)
downloadnasm-5c0b082c9289d78577168ad7eaf13b56c58deb5c.tar.gz
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>
-rw-r--r--parser.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/parser.c b/parser.c
index 123da487..423d7855 100644
--- a/parser.c
+++ b/parser.c
@@ -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;