]> xenbits.xensource.com Git - libvirt.git/commit
qemu: avoid leaking uninit data from hotplug to dumpxml
authorEric Blake <eblake@redhat.com>
Fri, 21 Oct 2011 23:09:17 +0000 (17:09 -0600)
committerEric Blake <eblake@redhat.com>
Mon, 24 Oct 2011 20:58:43 +0000 (14:58 -0600)
commit2c27dfaeb1881a77a9463fde56a8c314528194d1
treef54f07358e5006ec97a3bb46d946b0d3d9b8361a
parent9981fc5828f594b0cb159f607acfee6cff060331
qemu: avoid leaking uninit data from hotplug to dumpxml

Detected by Coverity.  Both text and JSON monitors set only the
bus and unit fields, which means driveAddr.controller spends
life as garbage on the stack, and is then memcpy()'d into the
in-memory representation which the user can see via dumpxml.

* src/qemu/qemu_hotplug.c (qemuDomainAttachSCSIDisk): Only copy
defined fields.
src/qemu/qemu_hotplug.c