mirror of git://git.sysmocom.de/ofono
Properly skip over quoted values
Otherwise a left paren in a string can bring an obscure segfault.
This commit is contained in:
parent
b68c673d45
commit
19187a0ee7
|
@ -361,6 +361,17 @@ static gint skip_until(const char *line, int start, const char delim)
|
|||
if (line[i] == delim)
|
||||
return i;
|
||||
|
||||
if (line[i] == '\"') {
|
||||
i += 1;
|
||||
while (i < len && line[i] != '\"')
|
||||
i += 1;
|
||||
|
||||
if (i < len)
|
||||
i += 1;
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if (line[i] != '(') {
|
||||
i += 1;
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue