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

ruby-changes:41965

From: nagachika <ko1@a...>
Date: Wed, 9 Mar 2016 03:52:04 +0900 (JST)
Subject: [ruby-changes:41965] nagachika:r54039 (ruby_2_2): merge revision(s) 53259: [Backport #11862]

nagachika	2016-03-09 03:51:58 +0900 (Wed, 09 Mar 2016)

  New Revision: 54039

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

  Log:
    merge revision(s) 53259: [Backport #11862]
    
    * ext/socket/init.c (rsock_init_sock): reject reserved FDs
      [ruby-core:72445] [Bug #11862]

  Modified directories:
    branches/ruby_2_2/
  Modified files:
    branches/ruby_2_2/ChangeLog
    branches/ruby_2_2/ext/socket/init.c
    branches/ruby_2_2/version.h
Index: ruby_2_2/ext/socket/init.c
===================================================================
--- ruby_2_2/ext/socket/init.c	(revision 54038)
+++ ruby_2_2/ext/socket/init.c	(revision 54039)
@@ -58,7 +58,7 @@ rsock_init_sock(VALUE sock, int fd) https://github.com/ruby/ruby/blob/trunk/ruby_2_2/ext/socket/init.c#L58
 {
     rb_io_t *fp;
 
-    if (!is_socket(fd)) {
+    if (!is_socket(fd) || rb_reserved_fd_p(fd)) {
 	errno = EBADF;
 	rb_sys_fail("not a socket file descriptor");
     }
Index: ruby_2_2/version.h
===================================================================
--- ruby_2_2/version.h	(revision 54038)
+++ ruby_2_2/version.h	(revision 54039)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_2/version.h#L1
 #define RUBY_VERSION "2.2.5"
 #define RUBY_RELEASE_DATE "2016-03-09"
-#define RUBY_PATCHLEVEL 243
+#define RUBY_PATCHLEVEL 244
 
 #define RUBY_RELEASE_YEAR 2016
 #define RUBY_RELEASE_MONTH 3
Index: ruby_2_2/ChangeLog
===================================================================
--- ruby_2_2/ChangeLog	(revision 54038)
+++ ruby_2_2/ChangeLog	(revision 54039)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_2/ChangeLog#L1
+Wed Mar  9 03:51:48 2016  Eric Wong  <e@8...>
+
+	* ext/socket/init.c (rsock_init_sock): reject reserved FDs
+	  [ruby-core:72445] [Bug #11862]
+
 Wed Mar  9 03:41:27 2016  Eric Wong  <e@8...>
 
 	* ext/socket/init.c (rsock_init_sock): check FD after validating

Property changes on: ruby_2_2
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r53259


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

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