From: Shivaprasad G Bhat <sbhat@linux.ibm.com>
To: Greg Kurz <groug@kaod.org>
Cc: peter.maydell@linaro.org, qemu-ppc@nongnu.org,
qemu-devel@nongnu.org, david@gibson.dropbear.id.au
Subject: Re: [PATCH] spapr: Fix Coverity warning while validating nvdimm options
Date: Thu, 27 Feb 2020 19:14:32 +0530 [thread overview]
Message-ID: <9148d7ac-3ae9-3a97-fd21-9b15a1a8ee4d@linux.ibm.com> (raw)
In-Reply-To: <20200227132816.191b80ac@bahia.home>
On 02/27/2020 05:58 PM, Greg Kurz wrote:
> On Wed, 26 Feb 2020 13:49:27 +0100
> Greg Kurz <groug@kaod.org> wrote:
>
>>> - qemu_uuid_parse(uuidstr, &uuid);
> ... cause a segv in there because uuidstr will be dereferenced at
> some point without checking if it's NULL.
>
> AFAICT there are two scenarios that can cause object_property_get_str()
> to return NULL:
> - the property doesn't exist
> - the property isn't a string
>
> This can probably never happen with the current code base but we
> can't about future changes. In order to ensure we abort rather
> than segv, I'd pass &error_abort to object_property_get_str().
Thanks! I just posted the V2 fixing this as well.
Regards,
Shivaprasad
prev parent reply other threads:[~2020-02-27 13:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-26 12:10 [PATCH] spapr: Fix Coverity warning while validating nvdimm options Shivaprasad G Bhat
2020-02-26 12:27 ` Philippe Mathieu-Daudé
2020-02-26 12:49 ` Greg Kurz
2020-02-27 12:28 ` Greg Kurz
2020-02-27 13:44 ` Shivaprasad G Bhat [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=9148d7ac-3ae9-3a97-fd21-9b15a1a8ee4d@linux.ibm.com \
--to=sbhat@linux.ibm.com \
--cc=david@gibson.dropbear.id.au \
--cc=groug@kaod.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@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).