From: nasm-bot f. C. G. <gor...@gm...> - 2014-11-22 15:24:31
|
Commit-ID: 5c0b082c9289d78577168ad7eaf13b56c58deb5c Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=5c0b082c9289d78577168ad7eaf13b56c58deb5c Author: Cyrill Gorcunov <gor...@gm...> AuthorDate: Sat, 22 Nov 2014 18:20:29 +0300 Committer: Cyrill Gorcunov <gor...@gm...> CommitDate: Sat, 22 Nov 2014 18:20:29 +0300 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 <gor...@gm...> --- parser.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/parser.c b/parser.c index 123da48..423d785 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; |