forked from aniani/nasm
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:
4
quote.c
4
quote.c
@@ -441,8 +441,10 @@ char *nasm_skip_string(char *str)
|
|||||||
return p;
|
return p;
|
||||||
} else if (bq == '`') {
|
} else if (bq == '`') {
|
||||||
/* `...` string */
|
/* `...` string */
|
||||||
p = str+1;
|
|
||||||
state = st_start;
|
state = st_start;
|
||||||
|
p = str+1;
|
||||||
|
if (!*p)
|
||||||
|
return p;
|
||||||
|
|
||||||
while ((c = *p++)) {
|
while ((c = *p++)) {
|
||||||
switch (state) {
|
switch (state) {
|
||||||
|
Reference in New Issue
Block a user