summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-21 16:04:50 +0000
committerkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-21 16:04:50 +0000
commitfedc3a4b5ff9f8f0dfc8fb3227e300cbe35a3a7e (patch)
tree24cc5a280367872f1226c14dfe748ad4df516210
parent139d06c34f4d51147a5d7707e738878b1fda65bf (diff)
fix second argument of MEMZERO
* ext/socket/raddrinfo.c (rb_getaddrinfo): second argument of MEMZERO is type. Coverity Scan found this bug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-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;