[libvirt] [PATCH 5/9] virsh: do not access uninitialized memory in cmdDomFSInfo

Ján Tomko jtomko at redhat.com
Tue Feb 12 09:21:23 UTC 2019


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 <jtomko at redhat.com>
---
 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;
 
-- 
2.19.2




More information about the libvir-list mailing list