On 05/10/17 06:20, ros...@gmail.com wrote:
On Wed, 2017-10-04 at 20:43 -0700, Kurt H Maier wrote:
On Wed, Oct 04, 2017 at 07:23:22PM -0700, Rosen Penev wrote:
- if (intname && strlen(intname) != 0)
+ if (!strlen(intname))
ifindex = if_nametoindex(intname); /* index == 0 when not
binding to an interface */
How much testing have you done of these patches?
Compile time. Looks fine to me. To add to my commit message,
strlen(NULL) causes a segmentation fault, meaning intname cannot be
Which is precisely why the 'intname' guard is there. C evaluation order
is left to right, if 'intname' is NULL then evaluation stops there....
strlen is never called with a NULL intname.
Dnsmasq-discuss mailing list