[PATCH] bug in __check_pf() (getaddrinfo.c)

Hiroshi Shinji hiroshi.shinji at gmail.com
Sat Dec 6 03:36:15 UTC 2008


Hi Khem,
Thanks for your comment.

2008/12/6 Khem Raj <raj.khem at gmail.com>:
> Getting NULL for ifa_addr means that the interface has no address. Do
> you know in what cases does this happen. Patch looks ok though.

True. My environment has a interface that has no address.

And, previous source code had another problem.
'for' statement had no '{' and '}'.
Therefore, If you defined both __UCLIBC_HAS_IPV4__ and __UCLIBC_HAS_IPV6__,
the second 'if' statement would be outside of the for-loop and occure segfault.


>
> On Fri, Dec 5, 2008 at 1:16 PM, Hiroshi Shinji <hiroshi.shinji at gmail.com> wrote:
>> Hi,
>>
>> I built root file system using buildroot, but some
>> commands (ping(busybox), sshd, ntpdate, etc) occured
>> segmentation fault in getaddrinfo().
>> So I read uclibc/libc/inet/getaddrinfo.c and found a bug in __check_pf().
>> (It has no NULL check and so on.)
>>
>> Please review this patch.
>>
>> Regards,
>>
>> --
>> Hiroshi Shinji
>> hiroshi.shinji at gmail.com
>>
>> _______________________________________________
>> uClibc mailing list
>> uClibc at uclibc.org
>> http://busybox.net/cgi-bin/mailman/listinfo/uclibc
>>
>

-- 
宍道 洋
hiroshi.shinji at gmail.com



More information about the uClibc mailing list