From a45febd767642dafc017a3210f357c7a2139e475 Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Sun, 23 Nov 2014 18:26:54 +0300 Subject: [PATCH] quote: Fix returning out of string pointer In case if string is a single grave accent we return the pointer to uninitialized space. http://bugzilla.nasm.us/show_bug.cgi?id=3392292 Signed-off-by: Cyrill Gorcunov --- quote.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/quote.c b/quote.c index fe1c97d9..b1e9dbae 100644 --- a/quote.c +++ b/quote.c @@ -441,8 +441,10 @@ char *nasm_skip_string(char *str) return p; } else if (bq == '`') { /* `...` string */ - p = str+1; state = st_start; + p = str+1; + if (!*p) + return p; while ((c = *p++)) { switch (state) { -- 2.11.4.GIT