Re: [libvirt] [PATCH] nwfilter_ebiptables_driver.c: avoid NULL dereference

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

 



On 03/29/2010 10:37 AM, Jim Meyering wrote:
> Another one caught by clang:
> 
> Note the first test to see if "inst" may be NULL.
> Then, in the following loop, "inst" is unconditionally
> dereferenced via "inst[i]".  There are other unprotected
> used of "inst[i]" below, too.
> 
> Rather than trying to protect all uses, one by one, I chose
> to return "success" when given an empty list of rules.

ACK that your patch is the minimal fix to avoid a segfault, but we
should probably get Stefan's input on whether returning success on an
empty input is the best course of behavior.

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
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]