Re: [PATCH] qemu: Don't access uninitialized memory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 16/03/16 10:48, Martin Kletzander wrote:
> Very early ping, I know, but it's almost trivial and it fixes a crash
> when running domxml-to-native.
> 
> On Fri, Mar 11, 2016 at 02:25:16PM +0100, Martin Kletzander wrote:
>> In qemuConnectDomainXMLToNative() we set up the monitor, but we never
>> memset() it to zeros.  Thanks to the introduction of the logfile
>> parameter of chardevs (and the logfile member of the struct), we started
>> checking whether that's non-NULL and that exposed this old error.
>>
>> Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
>> ---
>> src/qemu/qemu_driver.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
>> index a0d6596aef7b..e868b9f899e7 100644
>> --- a/src/qemu/qemu_driver.c
>> +++ b/src/qemu/qemu_driver.c
>> @@ -6950,7 +6950,7 @@ static char
>> *qemuConnectDomainXMLToNative(virConnectPtr conn,
>> {
>>     virQEMUDriverPtr driver = conn->privateData;
>>     virDomainDefPtr def = NULL;
>> -    virDomainChrSourceDef monConfig;
>> +    virDomainChrSourceDef monConfig = {0};
>>     virQEMUCapsPtr qemuCaps = NULL;
>>     bool monitor_json = false;
>>     virCommandPtr cmd = NULL;
>> -- 
>> 2.7.3
>>
>> -- 
>> libvir-list mailing list
>> libvir-list@xxxxxxxxxx
>> https://www.redhat.com/mailman/listinfo/libvir-list

ACK

Erik

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]