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