fix gethostbyaddr_r to fill struct hostent.h_length as appropriate
authorTimo Teräs <timo.teras@iki.fi>
Tue, 22 Mar 2016 14:27:51 +0000 (16:27 +0200)
committerRich Felker <dalias@aerifal.cx>
Thu, 24 Mar 2016 17:48:47 +0000 (13:48 -0400)
src/network/gethostbyaddr_r.c

index 66e03309408c9df979a0949a2f23acf3bd8b8591..0f1e61aa0c358a1c7e6fcfc664772e7c77e99c92 100644 (file)
@@ -64,6 +64,7 @@ int gethostbyaddr_r(const void *a, socklen_t l, int af,
        }
 
        h->h_addrtype = af;
+       h->h_length = l;
        h->h_name = h->h_aliases[0];
        *res = h;
        return 0;