From: "Andreas Färber" <afaerber@suse.de>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
Michael Tokarev <mjt@tls.msk.ru>,
patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH] qjson.h: Remove spurious GCC_FMT_ATTR markup from qobject_from_json() declaration
Date: Sun, 02 Mar 2014 23:51:54 +0100 [thread overview]
Message-ID: <5313B60A.8010303@suse.de> (raw)
In-Reply-To: <1393458706-24883-1-git-send-email-peter.maydell@linaro.org>
Am 27.02.2014 00:51, schrieb Peter Maydell:
> The function qobject_from_json() doesn't actually allow its
> argument to be a format string -- it passes a NULL va_list*
> to qobject_from_jsonv(), and the parser code will then never
> actually intepret %-escape sequences (it tests whether the
"interpret"
> va_list pointer is NULL and will stop with a parse error).
>
> The spurious attribute markup causes clang warnings in some
> of the test cases where we programmatically construct JSON
> to feed to qobject_from_json():
>
> tests/test-qmp-input-visitor.c:76:35: warning: format string is not a
> string literal (potentially insecure) [-Wformat-security]
> data->obj = qobject_from_json(json_string);
> ^~~~~~~~~~~
>
> Remove the incorrect attribute.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Otherwise
Reviewed-by: Andreas Färber <afaerber@suse.de>
Regards,
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
prev parent reply other threads:[~2014-03-02 22:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-26 23:51 [Qemu-devel] [PATCH] qjson.h: Remove spurious GCC_FMT_ATTR markup from qobject_from_json() declaration Peter Maydell
2014-02-26 23:56 ` Eric Blake
2014-03-02 13:21 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
2014-03-02 22:51 ` Andreas Färber [this message]
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=5313B60A.8010303@suse.de \
--to=afaerber@suse.de \
--cc=mjt@tls.msk.ru \
--cc=patches@linaro.org \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).