diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/network/getnameinfo.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/getnameinfo.c b/src/network/getnameinfo.c index 3484fc69..5e6fae3e 100644 --- a/src/network/getnameinfo.c +++ b/src/network/getnameinfo.c @@ -135,13 +135,13 @@ int getnameinfo(const struct sockaddr *restrict sa, socklen_t sl, switch (af) { case AF_INET: a = (void *)&((struct sockaddr_in *)sa)->sin_addr; - if (sl != sizeof(struct sockaddr_in)) return EAI_FAMILY; + if (sl < sizeof(struct sockaddr_in)) return EAI_FAMILY; mkptr4(ptr, a); scopeid = 0; break; case AF_INET6: a = (void *)&((struct sockaddr_in6 *)sa)->sin6_addr; - if (sl != sizeof(struct sockaddr_in6)) return EAI_FAMILY; + if (sl < sizeof(struct sockaddr_in6)) return EAI_FAMILY; if (memcmp(a, "\0\0\0\0\0\0\0\0\0\0\xff\xff", 12)) mkptr6(ptr, a); else |