From 224d938c5e538ac37f84c6e9a01bd2095aa7081a Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Wed, 20 Feb 2019 17:51:22 -0500 Subject: 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. --- src/network/getaddrinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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