From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org, mreitz@redhat.com, eblake@redhat.com,
dgilbert@redhat.com
Subject: Re: [Qemu-devel] [PATCH] json: Fix to reject duplicate object member names
Date: Thu, 6 Dec 2018 12:20:17 +0000 [thread overview]
Message-ID: <20181206122017.GI29540@redhat.com> (raw)
In-Reply-To: <20181206121743.20762-1-armbru@redhat.com>
On Thu, Dec 06, 2018 at 01:17:43PM +0100, Markus Armbruster wrote:
> 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 <mreitz@redhat.com>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
> qobject/json-parser.c | 5 +++++
> tests/qemu-iotests/229 | 1 -
> 2 files changed, 5 insertions(+), 1 deletion(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2018-12-06 12:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-06 12:17 [Qemu-devel] [PATCH] json: Fix to reject duplicate object member names Markus Armbruster
2018-12-06 12:20 ` Daniel P. Berrangé [this message]
2018-12-06 12:50 ` Philippe Mathieu-Daudé
2018-12-06 13:11 ` Markus Armbruster
2018-12-06 13:11 ` no-reply
2018-12-13 8:57 ` Markus Armbruster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181206122017.GI29540@redhat.com \
--to=berrange@redhat.com \
--cc=armbru@redhat.com \
--cc=dgilbert@redhat.com \
--cc=eblake@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.