From: Daniel P. Berrange Date: Wed, 20 Apr 2011 10:39:51 +0000 (+0100) Subject: Remove bogus assert() from migration code X-Git-Tag: CVE-2011-2178~288 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b83cc42193952e22078f6c84e69436666b05db7;p=thirdparty%2Flibvirt.git Remove bogus assert() from migration code assert() is forbidden in libvirt code, and these two cases would in fact never execute due to earlier error checks. * src/libvirt.c: Remove assert() usage --- diff --git a/src/libvirt.c b/src/libvirt.c index e74e9774ef..abacf85911 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include @@ -3374,7 +3373,6 @@ virDomainMigrateVersion1 (virDomainPtr domain, } if (uri_out) uri = uri_out; /* Did domainMigratePrepare change URI? */ - assert (uri != NULL); /* Perform the migration. The driver isn't supposed to return * until the migration is complete. @@ -3464,7 +3462,6 @@ virDomainMigrateVersion2 (virDomainPtr domain, } if (uri_out) uri = uri_out; /* Did domainMigratePrepare2 change URI? */ - assert (uri != NULL); /* Perform the migration. The driver isn't supposed to return * until the migration is complete.