On Mon, Dec 14, 2009 at 05:05:03PM +0100, Jim Meyering wrote:
The fix here is to add the missing "goto".
Nearly every other use of qemudReportError is followed
closely by a goto or a return statement.
>From 898033ec5bb0399f7cc6a22ffd9f351552ced85b Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering(a)redhat.com>
Date: Mon, 14 Dec 2009 17:02:56 +0100
Subject: [PATCH] qemu migration: avoid NULL-deref given an invalid input
* src/qemu/qemu_driver.c (doNonTunnelMigrate): Don't let a
NULL "uri_out" provoke a NULL-dereference in doNativeMigrate:
supply omitted goto-after-qemudReportError.
---
src/qemu/qemu_driver.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index c782f0d..9ef6c35 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -7430,6 +7430,7 @@ static int doNonTunnelMigrate(virDomainPtr dom,
if (uri_out == NULL) {
qemudReportError(NULL, NULL, NULL, VIR_ERR_INTERNAL_ERROR, "%s",
_("domainMigratePrepare2 did not set uri"));
+ goto cleanup;
}
if (doNativeMigrate(dom, driver, vm, uri_out, flags, dname, resource) < 0)
--
ACK
Daniel
--
|: Red Hat, Engineering, London -o-
http://people.redhat.com/berrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org -o-
http://ovirt.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|