1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ngoto 2015-06-05 16:11:47 +00:00
parent eb774ceb22
commit 607abcc7be
2 changed files with 9 additions and 4 deletions

View file

@ -1,3 +1,11 @@
Sat Jun 6 01:00:06 2015 Naohisa Goto <ngotogenome@gmail.com>
* 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@atdot.net>
* class.c (ins_methods_push): change 3rd parameter's type

View file

@ -1151,11 +1151,8 @@ bsock_sendmsg_internal(int argc, VALUE *argv, VALUE sock, int nonblock)
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);