From eb3f5a2c6dfabc2dbc280c0816352d9300c62b20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Tue, 12 Feb 2019 07:51:19 +0100 Subject: [PATCH] virsh: do not access uninitialized memory in cmdDomFSInfo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Initialize 'info' to prevent accessing random access memory. Introduced by commit 3072ded released in 4.8.0. https://bugzilla.redhat.com/show_bug.cgi?id=1676354 Signed-off-by: Ján Tomko --- tools/virsh-domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 651766cd84..d5026286c9 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -13938,7 +13938,7 @@ cmdDomFSInfo(vshControl *ctl, const vshCmd *cmd) virDomainPtr dom = NULL; int rc = -1; size_t i, j; - virDomainFSInfoPtr *info; + virDomainFSInfoPtr *info = NULL; vshTablePtr table = NULL; size_t ninfos = 0;