Re: [PATCHv2] virsh: avoid uninitialized memory usage

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

 



On 04/19/2012 02:56 AM, Wen Congyang wrote:
> At 04/19/2012 04:51 PM, Alex Jia Wrote:
>> Detected by valgrind.
>>
>> * tools/virsh.c (cmdBlockPull): fix uninitialized memory usage.
>>  

>> +++ b/tools/virsh.c
>> @@ -7634,6 +7634,7 @@ cmdBlockPull(vshControl *ctl, const vshCmd *cmd)
>>  
>>          intCaught = 0;
>>          sig_action.sa_sigaction = vshCatchInt;
>> +        sig_action.sa_flags = 0;
>>          sigemptyset(&sig_action.sa_mask);
>>          sigaction(SIGINT, &sig_action, &old_sig_action);
>>  
> 
> ACK

NACK.  vshCatchInt is a 3-arg function, and therefore
sig_action.sa_flags must include at least SA_SIGINFO.  I inadvertently
missed a line when copying code from vshWatchJob(); I'll push the
obvious v3 patch shortly.

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
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]