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

ruby-changes:35243

From: nagachika <ko1@a...>
Date: Sun, 31 Aug 2014 01:09:19 +0900 (JST)
Subject: [ruby-changes:35243] nagachika:r47325 (ruby_2_1): merge revision(s) r47153: [Backport #10127]

nagachika	2014-08-31 01:09:10 +0900 (Sun, 31 Aug 2014)

  New Revision: 47325

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

  Log:
    merge revision(s) r47153: [Backport #10127]
    
    * ext/win32ole/win32ole.c (ole_create_dcom): use the converted
      result if the argument can be converted to a string, to get rid
      of invalid access. Thanks to nobu. [ruby-dev:48467] [Bug #10127]

  Modified directories:
    branches/ruby_2_1/
  Modified files:
    branches/ruby_2_1/ChangeLog
    branches/ruby_2_1/ext/win32ole/win32ole.c
    branches/ruby_2_1/version.h
Index: ruby_2_1/ChangeLog
===================================================================
--- ruby_2_1/ChangeLog	(revision 47324)
+++ ruby_2_1/ChangeLog	(revision 47325)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ChangeLog#L1
+Sun Aug 31 01:07:05 2014  Masaki Suketa <masaki.suketa@n...>
+
+	* ext/win32ole/win32ole.c (ole_create_dcom): use the converted
+	  result if the argument can be converted to a string, to get rid
+	  of invalid access. Thanks to nobu. [ruby-dev:48467] [Bug #10127]
+
 Sun Aug 31 00:54:47 2014  Nobuyoshi Nakada  <nobu@r...>
 
 	* process.c (open): use UTF-8 version function to support
Index: ruby_2_1/ext/win32ole/win32ole.c
===================================================================
--- ruby_2_1/ext/win32ole/win32ole.c	(revision 47324)
+++ ruby_2_1/ext/win32ole/win32ole.c	(revision 47325)
@@ -361,7 +361,7 @@ static VALUE typelib_file_from_typelib(V https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ext/win32ole/win32ole.c#L361
 static VALUE typelib_file(VALUE ole);
 static void ole_const_load(ITypeLib *pTypeLib, VALUE klass, VALUE self);
 static HRESULT clsid_from_remote(VALUE host, VALUE com, CLSID *pclsid);
-static VALUE ole_create_dcom(int argc, VALUE *argv, VALUE self);
+static VALUE ole_create_dcom(VALUE self, VALUE ole, VALUE host, VALUE others);
 static VALUE ole_bind_obj(VALUE moniker, int argc, VALUE *argv, VALUE self);
 static VALUE fole_s_connect(int argc, VALUE *argv, VALUE self);
 static VALUE fole_s_const_load(int argc, VALUE *argv, VALUE self);
@@ -2636,9 +2636,8 @@ clsid_from_remote(VALUE host, VALUE com, https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ext/win32ole/win32ole.c#L2636
 }
 
 static VALUE
-ole_create_dcom(int argc, VALUE *argv, VALUE self)
+ole_create_dcom(VALUE self, VALUE ole, VALUE host, VALUE others)
 {
-    VALUE ole, host, others;
     HRESULT hr;
     CLSID   clsid;
     OLECHAR *pbuf;
@@ -2656,7 +2655,6 @@ ole_create_dcom(int argc, VALUE *argv, V https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ext/win32ole/win32ole.c#L2655
             GetProcAddress(gole32, "CoCreateInstanceEx");
     if (!gCoCreateInstanceEx)
         rb_raise(rb_eRuntimeError, "CoCreateInstanceEx is not supported in this environment");
-    rb_scan_args(argc, argv, "2*", &ole, &host, &others);
 
     pbuf  = ole_vstr2wc(ole);
     hr = CLSIDFromProgID(pbuf, &clsid);
@@ -3270,7 +3268,7 @@ fole_initialize(int argc, VALUE *argv, V https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ext/win32ole/win32ole.c#L3268
             rb_raise(rb_eSecurityError, "Insecure Object Creation - %s",
                      StringValuePtr(svr_name));
         }
-        return ole_create_dcom(argc, argv, self);
+        return ole_create_dcom(self, svr_name, host, others);
     }
 
     /* get CLSID from OLE server name */
Index: ruby_2_1/version.h
===================================================================
--- ruby_2_1/version.h	(revision 47324)
+++ ruby_2_1/version.h	(revision 47325)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/version.h#L1
 #define RUBY_VERSION "2.1.2"
 #define RUBY_RELEASE_DATE "2014-08-31"
-#define RUBY_PATCHLEVEL 214
+#define RUBY_PATCHLEVEL 215
 
 #define RUBY_RELEASE_YEAR 2014
 #define RUBY_RELEASE_MONTH 8

Property changes on: ruby_2_1
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r47153


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

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