소스 검색

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;