Commit 00fc98ec authored by dermiste's avatar dermiste

fixing null pointer dereferencing

parent 5353d9a3
......@@ -666,7 +666,7 @@ kernel_addresses(char *ifname, int ifindex, int ll,
i = 0;
while(ifap && i < maxroutes) {
if(ifap->ifa_name == NULL || strcmp(ifap->ifa_name, ifname) != 0)
if(ifap->ifa_name == NULL || ifname == NULL || strcmp(ifap->ifa_name, ifname) != 0)
goto next;
if(ifap->ifa_addr->sa_family == AF_INET6) {
struct sockaddr_in6 *sin6 = (struct sockaddr_in6*)ifap->ifa_addr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment