Root/toolchain/uClibc/patches-0.9.30.1/900-backport_fix_possible_null_ptr_dereference_in_getaddrinfo.patch

1--- a/libc/inet/getaddrinfo.c
2+++ b/libc/inet/getaddrinfo.c
3@@ -187,6 +187,8 @@
4         }
5 
6         for (runp = ifa; runp != NULL; runp = runp->ifa_next) {
7+ if (runp->ifa_addr == NULL)
8+ continue;
9 #if defined __UCLIBC_HAS_IPV4__
10             if (runp->ifa_addr->sa_family == PF_INET)
11                 seen |= SEEN_IPV4;
12

Archive Download this file



interactive