[前][次][番号順一覧][スレッド一覧]

ruby-changes:33008

From: kazu <ko1@a...>
Date: Sat, 22 Feb 2014 01:04:55 +0900 (JST)
Subject: [ruby-changes:33008] kazu:r45087 (trunk): fix second argument of MEMZERO

kazu	2014-02-22 01:04:50 +0900 (Sat, 22 Feb 2014)

  New Revision: 45087

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45087

  Log:
    fix second argument of MEMZERO
    
    * ext/socket/raddrinfo.c (rb_getaddrinfo): second argument of
      MEMZERO is type.  Coverity Scan found this bug.

  Modified files:
    trunk/ChangeLog
    trunk/ext/socket/raddrinfo.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 45086)
+++ ChangeLog	(revision 45087)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sat Feb 22 00:58:51 2014  Kazuhiro NISHIYAMA  <zn@m...>
+
+	* 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@r...>
 
 	* ext/socket/init.c (wait_connectable): break if the socket is
Index: ext/socket/raddrinfo.c
===================================================================
--- ext/socket/raddrinfo.c	(revision 45086)
+++ ext/socket/raddrinfo.c	(revision 45087)
@@ -270,7 +270,7 @@ rb_getaddrinfo(const char *node, const c https://github.com/ruby/ruby/blob/trunk/ext/socket/raddrinfo.c#L270
         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;

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]