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

Re: [PATCH] Re: [Libvir] Segfault with invalid virConnectPtr



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


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