Module Name:    src
Committed By:   christos
Date:           Sat Aug 15 01:25:54 UTC 2009

Modified Files:
        src/crypto/external/bsd/openssl/dist/crypto/bio: b_sock.c

Log Message:
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


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
    src/crypto/external/bsd/openssl/dist/crypto/bio/b_sock.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/bio/b_sock.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/bio/b_sock.c:1.1.1.1 src/crypto/external/bsd/openssl/dist/crypto/bio/b_sock.c:1.2
--- src/crypto/external/bsd/openssl/dist/crypto/bio/b_sock.c:1.1.1.1	Sun Jul 19 19:03:00 2009
+++ src/crypto/external/bsd/openssl/dist/crypto/bio/b_sock.c	Fri Aug 14 21:25:54 2009
@@ -663,6 +663,8 @@
 	    	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;

Reply via email to