|
|
d76c62 |
From b501151fe2fb1f3b3e8d9617fb1b5a160832f480 Mon Sep 17 00:00:00 2001
|
|
|
d76c62 |
Message-Id: <b501151fe2fb1f3b3e8d9617fb1b5a160832f480@dist-git>
|
|
|
d76c62 |
From: Peter Krempa <pkrempa@redhat.com>
|
|
|
d76c62 |
Date: Fri, 28 Feb 2020 10:24:31 +0100
|
|
|
d76c62 |
Subject: [PATCH] virStorageFileGetMetadataRecurse: Expect NULL src->path
|
|
|
d76c62 |
MIME-Version: 1.0
|
|
|
d76c62 |
Content-Type: text/plain; charset=UTF-8
|
|
|
d76c62 |
Content-Transfer-Encoding: 8bit
|
|
|
d76c62 |
|
|
|
d76c62 |
The path can be NULL e.g. for NBD disks. Use NULLSTR to prevent use of
|
|
|
d76c62 |
NULL in %s.
|
|
|
d76c62 |
|
|
|
d76c62 |
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
|
|
d76c62 |
Reviewed-by: Eric Blake <eblake@redhat.com>
|
|
|
d76c62 |
(cherry picked from commit 157b8722cbcc57103d3dd9211aa94a2c592849b6)
|
|
|
d76c62 |
|
|
|
d76c62 |
https://bugzilla.redhat.com/show_bug.cgi?id=1798148
|
|
|
d76c62 |
Message-Id: <6f8aa7a68bbde2e405c83c53ee78e746d3efbf39.1582881363.git.pkrempa@redhat.com>
|
|
|
d76c62 |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
d76c62 |
---
|
|
|
d76c62 |
src/util/virstoragefile.c | 4 ++--
|
|
|
d76c62 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
d76c62 |
|
|
|
d76c62 |
diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c
|
|
|
d76c62 |
index 911f811ace..28d1d1aa1e 100644
|
|
|
d76c62 |
--- a/src/util/virstoragefile.c
|
|
|
d76c62 |
+++ b/src/util/virstoragefile.c
|
|
|
d76c62 |
@@ -4973,7 +4973,7 @@ virStorageFileGetMetadataRecurse(virStorageSourcePtr src,
|
|
|
d76c62 |
g_autoptr(virStorageSource) backingStore = NULL;
|
|
|
d76c62 |
|
|
|
d76c62 |
VIR_DEBUG("path=%s format=%d uid=%u gid=%u",
|
|
|
d76c62 |
- src->path, src->format,
|
|
|
d76c62 |
+ NULLSTR(src->path), src->format,
|
|
|
d76c62 |
(unsigned int)uid, (unsigned int)gid);
|
|
|
d76c62 |
|
|
|
d76c62 |
/* exit if we can't load information about the current image */
|
|
|
d76c62 |
@@ -4995,7 +4995,7 @@ virStorageFileGetMetadataRecurse(virStorageSourcePtr src,
|
|
|
d76c62 |
if (virHashLookup(cycle, uniqueName)) {
|
|
|
d76c62 |
virReportError(VIR_ERR_INTERNAL_ERROR,
|
|
|
d76c62 |
_("backing store for %s (%s) is self-referential"),
|
|
|
d76c62 |
- src->path, uniqueName);
|
|
|
d76c62 |
+ NULLSTR(src->path), uniqueName);
|
|
|
d76c62 |
goto cleanup;
|
|
|
d76c62 |
}
|
|
|
d76c62 |
|
|
|
d76c62 |
--
|
|
|
d76c62 |
2.25.1
|
|
|
d76c62 |
|