[libvirt] [PATCH] remote_driver.c: fix a NULL dereference in remoteDomainEventQueueFlush().

kakuma f-kak at ksh.biglobe.ne.jp
Tue Jan 12 00:15:29 UTC 2010

Hi, all.

There is a case of a NULL dereference in function remoteDomainEventQueueFlush()
in remote_driver.c
In the case of local connection conn->privateData->domainEvents isn't reserved.
In this case it will occurs segment fault.
(for example examples/domain-events/events-c/event-test.c)
I think the following patch will be available.


 src/remote/remote_driver.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index d6f5fce..b112fd3 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -8709,7 +8709,7 @@ void
 remoteDomainEventQueueFlush(int timer ATTRIBUTE_UNUSED, void *opaque)
     virConnectPtr conn = opaque;
-    struct private_data *priv = conn->privateData;
+    struct private_data *priv = conn->networkPrivateData;
     virDomainEventQueue tempQueue;


kakuma <f-kak at ksh.biglobe.ne.jp>

More information about the libvir-list mailing list