ruby-changes:35137
From: nobu <ko1@a...>
Date: Tue, 19 Aug 2014 10:29:50 +0900 (JST)
Subject: [ruby-changes:35137] nobu:r47219 (trunk): win32ole.c: check overflow
nobu 2014-08-19 10:29:45 +0900 (Tue, 19 Aug 2014) New Revision: 47219 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=47219 Log: win32ole.c: check overflow * ext/win32ole/win32ole.c (ole_invoke): check integer overflow on win64 platforms. Modified files: trunk/ext/win32ole/win32ole.c Index: ext/win32ole/win32ole.c =================================================================== --- ext/win32ole/win32ole.c (revision 47218) +++ ext/win32ole/win32ole.c (revision 47219) @@ -2553,7 +2553,7 @@ ole_invoke(int argc, VALUE *argv, VALUE https://github.com/ruby/ruby/blob/trunk/ext/win32ole/win32ole.c#L2553 /*------------------------------------------ hash object ==> named dispatch parameters --------------------------------------------*/ - cNamedArgs = RHASH_SIZE(param); + cNamedArgs = rb_long2int(RHASH_SIZE(param)); op.dp.cArgs = cNamedArgs + argc - 2; op.pNamedArgs = ALLOCA_N(OLECHAR*, cNamedArgs + 1); op.dp.rgvarg = ALLOCA_N(VARIANTARG, op.dp.cArgs); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/