summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--ext/socket/socket.c1
2 files changed, 5 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 7f431763f4..601ff6e56f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Tue Apr 2 15:09:05 2002 WATANABE Hirofumi <eban@ruby-lang.org>
+
+ * ext/socket/socket.c (sock_addrinfo): should clear addrinfo hints.
+
Mon Apr 1 23:48:12 2002 Takaaki Tateishi <ttate@kt.jaist.ac.jp>
* lib/mkmf.rb: install any files using $INSTALLFILES.
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index cc76bec78c..9a64399637 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -599,6 +599,7 @@ sock_addrinfo(host, port, socktype, flags)
}
else {
hintsp = &hints;
+ MEMZERO(&hints, struct addrinfo, 1);
hints.ai_family = PF_UNSPEC;
hints.ai_protocol = 0;
hints.ai_socktype = socktype;