Commit 529a0ef5 authored by Anthony Liguori's avatar Anthony Liguori
Browse files

json-lexer: reset the lexer state on an invalid token

parent 11e8a46c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;