summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--ext/socket/raddrinfo.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index a494633..96e5631 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sat Feb 22 00:58:51 2014 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+
+ * ext/socket/raddrinfo.c (rb_getaddrinfo): second argument of
+ MEMZERO is type. Coverity Scan found this bug.
+
Fri Feb 21 23:47:24 2014 Shugo Maeda <shugo@ruby-lang.org>
* ext/socket/init.c (wait_connectable): break if the socket is
diff --git a/ext/socket/raddrinfo.c b/ext/socket/raddrinfo.c
index b562273..ba87e24 100644
--- a/ext/socket/raddrinfo.c
+++ b/ext/socket/raddrinfo.c
@@ -270,7 +270,7 @@ rb_getaddrinfo(const char *node, const char *service,
ret = getaddrinfo(node, service, hints, &ai);
#else
struct getaddrinfo_arg arg;
- MEMZERO(&arg, sizeof arg, 1);
+ MEMZERO(&arg, struct getaddrinfo_arg, 1);
arg.node = node;
arg.service = service;
arg.hints = hints;