瀏覽代碼

fix gethostbyaddr_r to fill struct hostent.h_length as appropriate

Timo Teräs 9 年之前
父節點
當前提交
5978eb703c
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/network/gethostbyaddr_r.c

+ 1 - 0
src/network/gethostbyaddr_r.c

@@ -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;