summaryrefslogtreecommitdiff
path: root/ext/Socket
diff options
context:
space:
mode:
Diffstat (limited to 'ext/Socket')
-rw-r--r--ext/Socket/Socket.pm2
-rw-r--r--ext/Socket/Socket.xs3
2 files changed, 3 insertions, 2 deletions
diff --git a/ext/Socket/Socket.pm b/ext/Socket/Socket.pm
index bb053490e8..47b27e753f 100644
--- a/ext/Socket/Socket.pm
+++ b/ext/Socket/Socket.pm
@@ -1,7 +1,7 @@
package Socket;
our($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
-$VERSION = "1.78";
+$VERSION = "1.79";
=head1 NAME
diff --git a/ext/Socket/Socket.xs b/ext/Socket/Socket.xs
index 48f30d902d..f86c5aefa6 100644
--- a/ext/Socket/Socket.xs
+++ b/ext/Socket/Socket.xs
@@ -233,7 +233,8 @@ inet_aton(host)
struct hostent * phe;
int ok = (*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;
}