This code is really broken. It allocates struct sockaddr on the stack
and expects to work with IPV6. Tell the hints that we only want IPV4 for now, so that we don't try to bind to an IPV6 address as returned by getaddrinfo, and then we bash in V4 in the family! jeez
This commit is contained in:
parent
e70d1f0896
commit
13492ada53
|
@ -663,6 +663,8 @@ int BIO_get_accept_socket(char *host, int bind_mode)
|
|||
else if (h[0]=='*' && h[1]=='\0')
|
||||
h=NULL;
|
||||
}
|
||||
/* XXX: below we cast to sockaddr_in! */
|
||||
hint.ai_family = AF_INET;
|
||||
|
||||
if ((*p_getaddrinfo.f)(h,p,&hint,&res)) break;
|
||||
server = *res->ai_addr;
|
||||
|
|
Loading…
Reference in New Issue