qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] spapr: Fix Coverity warning while validating nvdimm options


From: Shivaprasad G Bhat
Subject: Re: [PATCH] spapr: Fix Coverity warning while validating nvdimm options
Date: Thu, 27 Feb 2020 19:14:32 +0530
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2

On 02/27/2020 05:58 PM, Greg Kurz wrote:
On Wed, 26 Feb 2020 13:49:27 +0100
Greg Kurz <address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]