[libvirt] [PATCH 05/12] debug: avoid null dereference on uuid lookup api
Matthias Bolte
matthias.bolte at googlemail.com
Tue Jun 7 13:37:11 UTC 2011
2011/6/6 Eric Blake <eblake at redhat.com>:
> Detected by Coverity. Commit a98d8f0d tried to make uuid debugging
> more robust, but missed some APIs. And on the APIs that it visited,
> the mere act of preparing the debug message ends up dereferencing
> uuid prior to the null check. Which means the APIs which are supposed
> to gracefully reject NULL arguments now end up with SIGSEGV.
>
> * src/libvirt.c (VIR_UUID_DEBUG): New macro.
> (virDomainLookupByUUID, virDomainLookupByUUIDString)
> (virNetworkLookupByUUID, virNetworkLookupByUUIDString)
> (virStoragePoolLookupByUUID, virStoragePoolLookupByUUIDString)
> (virSecretLookupByUUID, virSecretLookupByUUIDString)
> (virNWFilterLookupByUUID, virNWFilterLookupByUUIDString): Avoid
> null dereference.
> ---
> src/libvirt.c | 42 ++++++++++++++++++++++++++----------------
> 1 files changed, 26 insertions(+), 16 deletions(-)
>
ACK.
Matthias
More information about the libvir-list
mailing list