Statistics
| Branch: | Revision:

root / json-parser.c @ 42673936

History | View | Annotate | Download (12.8 kB)

# Date Author Comment
d758d90f 03/06/2010 11:32 pm Kevin Wolf

json-parser: Fix segfault on malformed input

If the parser fails to parse the key in parse_pair, it will access a NULL
pointer. A simple way to trigger this is sending {foo} via QMP. This patch
turns the segfault into a syntax error reply.

Signed-off-by: Kevin Wolf <>...

2c0d4b36 02/10/2010 08:47 pm Roy Tam

json: fix PRId64 on Win32

OK we are fooled by the json lexer and parser. As we use %I64d to
print 'long long' variables in Win32, but lexer and parser only deal
with %lld but not %I64d, this patch add support for %I64d and solve
'info pci', 'powser_reset' and 'power_powerdown' assert failure in...

2da69c8d 01/14/2010 01:14 am Amit Shah

json-parser: remove dead increment

clang-analyzer points out a redundant increment.

Signed-off-by: Amit Shah <>
Signed-off-by: Anthony Liguori <>

4a5fcab7 11/17/2009 04:49 pm Anthony Liguori

Add a JSON parser

This is the third and final stage of the JSON parser. It parses lexical tokens
performing grammar validation and creating the final QObject representation. It
uses a recursive decent parser.

Signed-off-by: Anthony Liguori <>