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 #1

Updated by suke (Masaki Suketa) almost 9 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) almost 9 years ago

  • Description updated (diff)

Updated by personnel (Am I Who) over 8 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) over 8 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) over 8 years ago

  • Backport changed from 2.3: REQUIRED to 2.3: DONE

ruby_2_3 r54923 merged revision(s) 53322,53323.

Actions #6

Updated by nobu (Nobuyoshi Nakada) over 8 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
Actions #7

Updated by suke (Masaki Suketa) about 8 years ago

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

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0