From 63b1633f869d6866ed70dbf80efc954d26127a04 Mon Sep 17 00:00:00 2001 From: xtkoba <69125751+xtkoba@users.noreply.github.com> Date: Sun, 9 May 2021 09:18:52 +0900 Subject: [ruby/win32ole] Get rid of potential undefined behavior See https://bugs.llvm.org/show_bug.cgi?id=50236 https://github.com/ruby/win32ole/commit/019ec2b3cb --- ext/win32ole/win32ole.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/win32ole/win32ole.c b/ext/win32ole/win32ole.c index 5ad6a80eb9..d77347b3a3 100644 --- a/ext/win32ole/win32ole.c +++ b/ext/win32ole/win32ole.c @@ -2522,12 +2522,12 @@ fole_initialize(int argc, VALUE *argv, VALUE self) OLE_RELEASE(pIClassFactory2); } } - pDispatch = p; if(FAILED(hr)) { ole_raise(hr, eWIN32OLERuntimeError, "failed to create WIN32OLE object from `%s'", StringValuePtr(svr_name)); } + pDispatch = p; ole_set_member(self, pDispatch); return self; -- cgit v1.2.3