From 3144e84add8b152cc7a71e44617ce6f21daa4ba3 Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Sun, 22 Oct 2017 10:50:55 +0300 Subject: preproc: Don't access offsting byte on unterminated strings https://bugzilla.nasm.us/show_bug.cgi?id=3392446 Signed-off-by: Cyrill Gorcunov --- asm/preproc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/asm/preproc.c b/asm/preproc.c index a8388bcb..7b1e2bff 100644 --- a/asm/preproc.c +++ b/asm/preproc.c @@ -948,7 +948,9 @@ static Token *tokenize(char *line) case '\'': case '\"': case '`': - p = nasm_skip_string(p - 1) + 1; + p = nasm_skip_string(p - 1); + if (*p) + p++; break; default: break; -- cgit v1.2.1