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

ruby-changes:38703

From: ngoto <ko1@a...>
Date: Sat, 6 Jun 2015 01:12:03 +0900 (JST)
Subject: [ruby-changes:38703] ngoto:r50784 (trunk): * ext/socket/ancdata.c (bsock_sendmsg_internal): all arguments are

ngoto	2015-06-06 01:11:47 +0900 (Sat, 06 Jun 2015)

  New Revision: 50784

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

  Log:
    * ext/socket/ancdata.c (bsock_sendmsg_internal): all arguments are
      parsed even on systems without HAVE_STRUCT_MSGHDR_MSG_CONTROL
      to prevent SEGV caused by passing Qnil to RARRAY_LENINT and
      to preserve behavior before r50776.
      [Bug #11224] [ruby-core:69468] [Bug #11225] [ruby-core:69469]

  Modified files:
    trunk/ChangeLog
    trunk/ext/socket/ancdata.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 50783)
+++ ChangeLog	(revision 50784)
@@ -1,3 +1,11 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sat Jun  6 01:00:06 2015  Naohisa Goto  <ngotogenome@g...>
+
+	* ext/socket/ancdata.c (bsock_sendmsg_internal): all arguments are
+	  parsed even on systems without HAVE_STRUCT_MSGHDR_MSG_CONTROL
+	  to prevent SEGV caused by passing Qnil to RARRAY_LENINT and
+	  to preserve behavior before r50776.
+	  [Bug #11224] [ruby-core:69468] [Bug #11225] [ruby-core:69469]
+
 Fri Jun  5 22:37:42 2015  Koichi Sasada  <ko1@a...>
 
 	* class.c (ins_methods_push): change 3rd parameter's type
Index: ext/socket/ancdata.c
===================================================================
--- ext/socket/ancdata.c	(revision 50783)
+++ ext/socket/ancdata.c	(revision 50784)
@@ -1151,11 +1151,8 @@ bsock_sendmsg_internal(int argc, VALUE * https://github.com/ruby/ruby/blob/trunk/ext/socket/ancdata.c#L1151
 
     if (argc == 0)
         rb_raise(rb_eArgError, "mesg argument required");
-#if defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL)
+
     rb_scan_args(argc, argv, "12*", &data, &vflags, &dest_sockaddr, &controls);
-#else
-    rb_scan_args(argc, argv, "12", &data, &vflags, &dest_sockaddr);
-#endif
 
     StringValue(data);
     controls_num = RARRAY_LENINT(controls);

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

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