mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-02 01:45:17 +00:00
Fix uninitialized value in QEMU monitor FD sending code
The 'char control[CMSG_SPACE(sizeof(int))];' was not being wiped, so could potentially contain uninitialized bytes. While this was harmless in this case, it caused complaints from valgrind * src/qemu/qemu_monitor.c: memset 'control' variable in qemuMonitorIOWriteWithFD
This commit is contained in:
parent
5ab8746f69
commit
f870c99b45
@ -383,6 +383,7 @@ qemuMonitorIOWriteWithFD(qemuMonitorPtr mon,
|
||||
struct cmsghdr *cmsg;
|
||||
|
||||
memset(&msg, 0, sizeof(msg));
|
||||
memset(control, 0, sizeof(control));
|
||||
|
||||
iov[0].iov_base = (void *)data;
|
||||
iov[0].iov_len = len;
|
||||
|
Loading…
x
Reference in New Issue
Block a user