From: Daniel P. Berrange Date: Mon, 2 Dec 2013 16:56:16 +0000 (+0000) Subject: Ensure to zero out the virDomainBlockJobInfo arg X-Git-Tag: CVE-2013-6436~153 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4cac241a7b120c95221237a3961fc758f9b7a72e;p=thirdparty%2Flibvirt.git Ensure to zero out the virDomainBlockJobInfo arg The virDomainGetBlockJobInfo method did not zero out the virDomainBlockJobInfo pointer arg, so when block jobs were not active it would return garbage for the bandwidth/cur/end fields. Signed-off-by: Daniel P. Berrange --- diff --git a/src/libvirt.c b/src/libvirt.c index eff44eb72b..a2df53d3bf 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -20850,6 +20850,8 @@ int virDomainGetBlockJobInfo(virDomainPtr dom, const char *disk, virCheckNonNullArgGoto(disk, error); virCheckNonNullArgGoto(info, error); + memset(info, 0, sizeof(*info)); + if (conn->driver->domainGetBlockJobInfo) { int ret; ret = conn->driver->domainGetBlockJobInfo(dom, disk, info, flags);