From 428d2dfdb8ca41fde215364a06b5bd43901b5817 Mon Sep 17 00:00:00 2001 From: Martin Kletzander Date: Wed, 22 Jun 2016 17:27:46 +0200 Subject: [PATCH] Don't allow raneming domains to empty strings 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 --- src/libvirt-domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 2ca054a328..4e71a94389 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -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) {