From: Rich Felker Date: Wed, 20 Feb 2019 22:51:22 +0000 (-0500) Subject: fix invalid free of partial addrinfo list with multiple services X-Git-Tag: v1.1.22~58 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=224d938c5e538ac37f84c6e9a01bd2095aa7081a;p=oweals%2Fmusl.git fix invalid free of partial addrinfo list with multiple services the backindex stored by getaddrinfo to allow freeaddrinfo to perform partial-free wrongly used the address result index, rather than the output slot index, and thus was only valid when they were equal (nservs==1). patch based on report with proposed fix by Markus Wichmann. --- diff --git a/src/network/getaddrinfo.c b/src/network/getaddrinfo.c index 5ae8cbfb..209970ad 100644 --- a/src/network/getaddrinfo.c +++ b/src/network/getaddrinfo.c @@ -104,7 +104,7 @@ int getaddrinfo(const char *restrict host, const char *restrict serv, const stru } for (k=i=0; i