projects
/
framework
/
connectivity
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
27c1183
)
Properly skip over quoted values
author
Andrzej Zaborowski
<andrew.zaborowski@intel.com>
Tue, 10 Nov 2009 06:31:31 +0000
(07:31 +0100)
committer
Marcel Holtmann
<marcel@holtmann.org>
Tue, 10 Nov 2009 19:36:36 +0000
(20:36 +0100)
Otherwise a left paren in a string can bring an obscure segfault.
gatchat/gatresult.c
patch
|
blob
|
history
diff --git
a/gatchat/gatresult.c
b/gatchat/gatresult.c
index
3d07e13
..
688b26b
100644
(file)
--- a/
gatchat/gatresult.c
+++ b/
gatchat/gatresult.c
@@
-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;