]> xenbits.xensource.com Git - libvirt.git/commitdiff
Don't allow raneming domains to empty strings
authorMartin Kletzander <mkletzan@redhat.com>
Wed, 22 Jun 2016 15:27:46 +0000 (17:27 +0200)
committerMartin Kletzander <mkletzan@redhat.com>
Fri, 24 Jun 2016 09:14:51 +0000 (11:14 +0200)
It may cause unwanted behaviour (of course, is there any wanted one for
that case?) so we should rather disable the possibility of doing so.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1320893

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
src/libvirt-domain.c

index 2ca054a328b098632088a370a6bf2663a662f8cc..4e71a9438922f62d00cd09e7030971e25c514588 100644 (file)
@@ -8790,7 +8790,7 @@ virDomainRename(virDomainPtr dom,
 
     virResetLastError();
     virCheckDomainReturn(dom, -1);
-    virCheckNonNullArgGoto(new_name, error);
+    virCheckNonEmptyStringArgGoto(new_name, error);
     virCheckReadOnlyGoto(dom->conn->flags, error);
 
     if (dom->conn->driver->domainRename) {