Project

General

Profile

Bug #11880

blank string makes Win32ole crush

Added by arton (Akio Tajima) over 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
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

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

Updated by suke (Masaki Suketa) over 4 years ago

  • Status changed from Open to Closed

Applied in changeset r53322.


  • ext/win32ole/win32ole.c (ole_vstr2wc, ole_variant2val): fix blank string conversion. [Bug #11880] Thanks Akio Tajima for the patch!

Updated by nobu (Nobuyoshi Nakada) over 4 years ago

  • Description updated (diff)

Updated by personnel (Am I Who) about 4 years ago

  • Assignee changed from suke (Masaki Suketa) to nobu (Nobuyoshi Nakada)
  • ruby -v changed from ruby 2.3.0p0 (2015-12-25 revision 53290) [x64-mswin64_100] to ruby 2.3.1p112 (2016-04-26 revision 54768) [x64-mingw32]

Updated by nobu (Nobuyoshi Nakada) about 4 years ago

  • Assignee changed from nobu (Nobuyoshi Nakada) to suke (Masaki Suketa)
  • Backport changed from 2.3: UNKNOWN to 2.3: REQUIRED

Updated by nagachika (Tomoyuki Chikanaga) about 4 years ago

  • Backport changed from 2.3: REQUIRED to 2.3: DONE

ruby_2_3 r54923 merged revision(s) 53322,53323.

#6

Updated by nobu (Nobuyoshi Nakada) about 4 years ago

  • Has duplicate Bug #12346: Ruby 2.3.0 64-bit (mingw64-32) WIN32OLE_TYPE.typelibs seg faults on Windows 10 64-bit added
#7

Updated by suke (Masaki Suketa) almost 4 years ago

  • Is duplicate of Bug #12778: Segmentation Fault in win32ole on Ruby 2.3.1p112 [x64-mingw32] when creating Windows Share added

Also available in: Atom PDF