Markus Armbruster <[email protected]> writes: > The JSON parser happily accepts duplicate object member names. The > last value wins. Reproducer #1: > > $ qemu-system-x86_64 -qmp stdio > {"QMP": {"version": {"qemu": {"micro": 93, "minor": 0, "major": 3}, > "package": "v3.1.0-rc3-7-g87a45d86ed"}, "capabilities": []}} > {'execute':'qmp_capabilities'} > {"return": {}} > {'execute':'blockdev-add','arguments':{'driver':'null-co', > 'node-name':'foo','node-name':'bar'}} > {"return": {}} > {'execute':'query-named-block-nodes'} > {"return": [{ [...] "node-name": "bar" [...] }]} > > Reproducer #2 is iotest 229. > > Fix the parser to reject duplicates, and fix iotest 229 not to use > them. > > Reported-by: Max Reitz <[email protected]> > Signed-off-by: Markus Armbruster <[email protected]>
Queued.
