forked from Imagelibrary/binutils-gdb
* linespec.c (decode_line_1): Skip argptr over a leading
double quote. Prevents alloc of 0 bytes and memcpy of -1 bytes.
This commit is contained in:
@@ -612,10 +612,10 @@ decode_line_1 (char **argptr, int funfirstline, struct symtab *default_symtab,
|
||||
|
||||
s = NULL;
|
||||
p = *argptr;
|
||||
if (p[0] == '"')
|
||||
if (**argptr == '"')
|
||||
{
|
||||
is_quote_enclosed = 1;
|
||||
p++;
|
||||
(*argptr)++;
|
||||
}
|
||||
else
|
||||
is_quote_enclosed = 0;
|
||||
|
||||
Reference in New Issue
Block a user