Project

General

Profile

Actions

Bug #11880

closed

blank string makes Win32ole crush

Added by arton (Akio Tajima) almost 9 years ago. Updated over 8 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 2.3.1p112 (2016-04-26 revision 54768) [x64-mingw32]
Backport:
[ruby-dev:49459]

Description

Win32OLEのオブジェクトに空文字列を与えるとクラッシュします。

再現スクリプト(method_missing側)

require 'win32ole'
shell = WIN32OLE.new('WScript.Shell')
shell.Popup('')

逆方向(COMコンポーネント側からの空文字列==SysAllocStringLen(0)のBSTRについても同様です。

添付のパッチで双方向とも修正できていると思います。


Files

blankstr.patch (930 Bytes) blankstr.patch 長さ0のBSTRはCOMの規約に従いNULLとするパッチ arton (Akio Tajima), 12/26/2015 02:57 PM

Related issues 2 (0 open2 closed)

Has duplicate Ruby master - Bug #12346: Ruby 2.3.0 64-bit (mingw64-32) WIN32OLE_TYPE.typelibs seg faults on Windows 10 64-bitClosedwindowsActions
Is duplicate of Ruby master - Bug #12778: Segmentation Fault in win32ole on Ruby 2.3.1p112 [x64-mingw32] when creating Windows ShareClosedActions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0