From a3f90d5ccafd3f0d6872196133e5786e6bac76e7 Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Mon, 24 Oct 2011 10:21:22 +0000 Subject: [PATCH] Unlike FreeBSD we use a ifmultiaddr struct field to store the address and let the ifma_addr point to that. Therefore freeing it caused a misaligned free and then a double free, resulting in heap corruption for the next user to fall victim to. Only happened when removing multicast addresses though. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42899 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/libs/compat/freebsd_network/if.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libs/compat/freebsd_network/if.c b/src/libs/compat/freebsd_network/if.c index 4b6e032806..257e44b8b8 100644 --- a/src/libs/compat/freebsd_network/if.c +++ b/src/libs/compat/freebsd_network/if.c @@ -406,7 +406,6 @@ if_freemulti(struct ifmultiaddr *ifma) if (ifma->ifma_lladdr != NULL) free(ifma->ifma_lladdr); - free(ifma->ifma_addr); free(ifma); }