History | View | Annotate | Download (3.2 kB)
json-streamer: limit the maximum recursion depth and maximum token count
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
json-streamer: make sure to reset token_size after emitting a token list
json-streamer: add handling for JSON_ERROR token/state
This allows a JSON_ERROR state to be passed to the streamer to force aflush of the current tokens and pass a NULL token list to the parserrather that have it churn on bad data. (Alternatively we could just not...
json-streamer: allow recovery after bad input
Once we detect a malformed message, make sure to reset our state.
json-streamer: Don't use qdict_put_obj()
It's not needed, use qobject_put() instead and get a cleaner code.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Add a JSON message boundary identifier
The second stage of our JSON parser is a simple state machine that identifiesindividual JSON values by counting the levels of nesting of tokens. It doesnot perform grammar validation. We use this to emit a full JSON value to the...