Re: [PATCH] Re: Segfault with invalid virConnectPtr

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

 



Daniel Veillard wrote:
@@ -786,7 +786,7 @@ virDomainGetConnect (virDomainPtr dom)
     DEBUG("dom=%p", dom);
if (!VIR_IS_DOMAIN (dom)) {
-        virLibDomainError (dom, VIR_ERR_INVALID_DOMAIN, __FUNCTION__);
+        virLibDomainError (NULL, VIR_ERR_INVALID_DOMAIN, __FUNCTION__);
         return NULL;
     }
     return dom->conn;

  unclear, if there is no way the conn can be extracted, then yes,
maybe that's true.

VIR_IS_DOMAIN returns false if:

  dom is NULL  --> we can't get the connection from a NULL pointer
or
  dom is corrupt --> we shouldn't trust dom

Rich.

--
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom.  Registered in
England and Wales under Company Registration No. 03798903

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]