Eric Blake 7e191fd939 json: even stricter trailing garbage detection
Since older yajl ignores trailing garbage, a client can cause
problems by intentionally ending the wrapper array early. Since
we already track nesting, it's not too much harder to reject
invalid nesting pops.

* src/util/virjson. (_virJSONParser): Add field.
(virJSONValueFromString): Set witness.
(virJSONParserHandleEndArray): Use it to catch abuse.
* tests/jsontest.c (mymain): Test it.

Signed-off-by: Eric Blake <eblake@redhat.com>
2015-06-25 09:11:15 +02:00
..
2014-07-16 06:48:53 -06:00
2015-04-16 18:35:41 +02:00
2015-04-09 19:27:08 -04:00
2015-04-09 19:27:08 -04:00
2014-12-15 10:34:18 +01:00
2015-06-16 13:46:20 +02:00
2015-01-26 09:14:04 +00:00
2014-04-07 06:14:45 -06:00
2014-04-07 06:14:45 -06:00
2014-10-22 13:09:49 +01:00
2013-12-24 17:36:47 +01:00
2013-12-24 17:36:47 +01:00
2015-04-02 16:05:32 +02:00
2015-04-15 16:43:28 +02:00
2015-03-27 11:06:05 +01:00
2014-12-16 11:15:27 +01:00
2015-03-13 15:31:33 +01:00
2015-06-16 09:15:10 -04:00
2015-03-25 10:00:53 +01:00
2014-10-15 09:25:33 +02:00
2014-07-03 10:41:15 +02:00
2014-03-04 12:24:13 +00:00