commit | 529a0ef5f30e28a801d6527a3556adcaa4959669 | [log] [tgz] |
---|---|---|
author | Anthony Liguori <aliguori@us.ibm.com> | Wed Jun 01 12:14:56 2011 -0500 |
committer | Anthony Liguori <aliguori@us.ibm.com> | Tue Jun 07 13:52:11 2011 -0500 |
tree | 7ae5aeed813137dd9ccbf1f62ceb8e88b1b35480 | |
parent | 11e8a46cc3594567c6ba9b745f8f1b7d50be5b75 [diff] [blame] |
json-lexer: reset the lexer state on an invalid token Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
diff --git a/json-lexer.c b/json-lexer.c index fe5a060..a5bbe9e 100644 --- a/json-lexer.c +++ b/json-lexer.c
@@ -305,6 +305,9 @@ new_state = IN_START; break; case IN_ERROR: + QDECREF(lexer->token); + lexer->token = qstring_new(); + new_state = IN_START; return -EINVAL; default: break;