[Pkg-libvirt-commits] [SCM] Libvirt Debian packaging branch, master, updated. debian/0.7.5-5-1-ga3b98c9

Laurent Léonard laurent at open-minds.org
Tue Jan 26 16:26:17 UTC 2010


The following commit has been merged in the master branch:
commit a3b98c9bbcf91f40ced8d3c5877c09d47b3521e8
Author: Laurent Léonard <laurent at open-minds.org>
Date:   Tue Jan 26 17:23:35 2010 +0100

    Don't free an uninitalized pointer in update_driver_name()
    
    Closes: #565983
    Thanks: Matthias Bolte

diff --git a/debian/patches/0010-Don-t-free-an-uninitalized-pointer-in-update_driver_.patch b/debian/patches/0010-Don-t-free-an-uninitalized-pointer-in-update_driver_.patch
new file mode 100644
index 0000000..4729591
--- /dev/null
+++ b/debian/patches/0010-Don-t-free-an-uninitalized-pointer-in-update_driver_.patch
@@ -0,0 +1,36 @@
+From: Matthias Bolte <matthias.bolte at googlemail.com>
+Date: Wed, 23 Dec 2009 21:18:04 +0000
+Subject: [PATCH] Don't free an uninitalized pointer in update_driver_name()
+
+This invalid free results in heap corruption. Some symptoms I saw
+because of this were libvirtd crashing and virt-manager hanging
+while trying to enumerate devices.
+
+Closes: #565983
+---
+ src/node_device/node_device_driver.c |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_device_driver.c
+index ecbac0f..fbadfca 100644
+--- a/src/node_device/node_device_driver.c
++++ b/src/node_device/node_device_driver.c
+@@ -78,7 +78,7 @@ static int update_driver_name(virConnectPtr conn,
+                               virNodeDeviceObjPtr dev)
+ {
+     char *driver_link = NULL;
+-    char *devpath;
++    char *devpath = NULL;
+     char *p;
+     int ret = -1;
+ 
+@@ -114,7 +114,7 @@ static int update_driver_name(virConnectPtr conn,
+ 
+ cleanup:
+     VIR_FREE(driver_link);
+-    free(devpath);
++    VIR_FREE(devpath);
+     return ret;
+ }
+ #else
+-- 
diff --git a/debian/patches/series b/debian/patches/series
index b097b6f..4f73fb1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,3 +7,4 @@
 0007-Implement-path-lookup-for-USB-by-vendor-product.patch
 0008-qemu-Use-log-output-for-pty-assignment-if-info-chard.patch
 0009-Fix-QEMU-driver-custom-domain-status-XML-extensions.patch
+0010-Don-t-free-an-uninitalized-pointer-in-update_driver_.patch

-- 
Libvirt Debian packaging



More information about the Pkg-libvirt-commits mailing list