Blob Blame Raw
diff -up perl-5.8.8/ext/Socket/Socket.xs.crr perl-5.8.8/ext/Socket/Socket.xs
--- perl-5.8.8/ext/Socket/Socket.xs.crr	2005-07-08 17:56:17.000000000 +0200
+++ perl-5.8.8/ext/Socket/Socket.xs	2008-03-19 14:24:02.000000000 +0100
@@ -236,7 +236,8 @@ inet_aton(host)
 		(*host != '\0') &&
 		inet_aton(host, &ip_address);
 
-	if (!ok && (phe = gethostbyname(host))) {
+	if (!ok && (phe = gethostbyname(host)) &&
+		phe->h_addrtype == AF_INET && phe->h_length == 4) {
 		Copy( phe->h_addr, &ip_address, phe->h_length, char );
 		ok = 1;
 	}