diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/network/getaddrinfo.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/network/getaddrinfo.c b/src/network/getaddrinfo.c index e58db6cf..5d45be74 100644 --- a/src/network/getaddrinfo.c +++ b/src/network/getaddrinfo.c @@ -62,6 +62,9 @@ int getaddrinfo(const char *restrict host, const char *restrict serv, const stru int result; int cnt; + if (family != AF_INET && family != AF_INET6 && family != AF_UNSPEC) + return EAI_FAMILY; + if (host && strlen(host)>255) return EAI_NONAME; if (serv && strlen(serv)>32) return EAI_SERVICE; |