Project

General

Profile

Bug #13672

Garbage input hangs ruby (not responding ^C)

Added by shyouhei (Shyouhei Urabe) about 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 2.5.0dev (2017-06-23 trunk 59146) [x86_64-darwin15]
[ruby-core:<unknown>]

Description

Passing the attached file makes hang.

ruby hang.rb

Files

hang.rb (4 Bytes) hang.rb shyouhei (Shyouhei Urabe), 06/23/2017 08:28 AM
#1

Updated by nobu (Nobuyoshi Nakada) about 3 years ago

  • Status changed from Open to Closed

Applied in changeset trunk|r59161.


parse.y: check multibyte char

  • parse.y (parser_precise_mbclen): check invalid multibyte char at skipping strings following ?x literal string, not to stuck in a infinite loop. [ruby-core:81746] [Bug #13672]

Updated by usa (Usaku NAKAMURA) about 3 years ago

  • Backport changed from 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: REQUIRED to 2.2: WONTFIX, 2.3: REQUIRED, 2.4: REQUIRED

memo: it seems that this not appears on ruby_2_3, but it should be backported.

Updated by usa (Usaku NAKAMURA) about 3 years ago

  • Backport changed from 2.2: WONTFIX, 2.3: REQUIRED, 2.4: REQUIRED to 2.2: WONTFIX, 2.3: DONE, 2.4: REQUIRED

ruby_2_3 r59241 merged revision(s) 59161.

Updated by nagachika (Tomoyuki Chikanaga) about 3 years ago

  • Backport changed from 2.2: WONTFIX, 2.3: DONE, 2.4: REQUIRED to 2.2: WONTFIX, 2.3: DONE, 2.4: DONE

ruby_2_4 r59401 merged revision(s) 59161.

Also available in: Atom PDF