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 <gorcunov@gmail.com>
This commit is contained in:
Cyrill Gorcunov 2014-11-23 18:26:54 +03:00
parent 5c0b082c92
commit a45febd767

View File

@ -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) {