projects
/
sdk
/
emulator
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
11e8a46
)
json-lexer: reset the lexer state on an invalid token
author
Anthony Liguori
<aliguori@us.ibm.com>
Wed, 1 Jun 2011 17:14:56 +0000
(12:14 -0500)
committer
Anthony Liguori
<aliguori@us.ibm.com>
Tue, 7 Jun 2011 18:52:11 +0000
(13:52 -0500)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
json-lexer.c
patch
|
blob
|
history
diff --git
a/json-lexer.c
b/json-lexer.c
index fe5a060d4dd1c5cad3fa30ec4cc349f7af5c2a46..a5bbe9e54dd147ac5a148f05bc527ea642265829 100644
(file)
--- a/
json-lexer.c
+++ b/
json-lexer.c
@@
-305,6
+305,9
@@
static int json_lexer_feed_char(JSONLexer *lexer, char ch)
new_state = IN_START;
break;
case IN_ERROR:
+ QDECREF(lexer->token);
+ lexer->token = qstring_new();
+ new_state = IN_START;
return -EINVAL;
default:
break;