[#78633] ruby/spec needs help from CRuby committers — Benoit Daloze <eregontp@...>
Currently, ruby/spec is maintained mostly by individuals and enjoys the
13 messages
2016/12/13
[#78963] Re: ruby/spec needs help from CRuby committers
— Urabe Shyouhei <shyouhei@...>
2017/01/04
I did ask attendees of last developer meeting to join this
[#78642] Re: ruby/spec needs help from CRuby committers
— Eric Wong <normalperson@...>
2016/12/14
Benoit Daloze <eregontp@gmail.com> wrote:
[ruby-core:78867] [Ruby trunk Bug#13034] rb_enc_ascget() does not handle 'needmore' error from rb_enc_procise_mbclen()
From:
usa@...
Date:
2016-12-27 10:52:39 UTC
List:
ruby-core #78867
Issue #13034 has been updated by Usaku NAKAMURA.
Backport changed from 2.1: UNKNOWN, 2.2: REQUIRED, 2.3: REQUIRED to 2.1: UNKNOWN, 2.2: DONE, 2.3: REQUIRED
ruby_2_2 r57217 merged revision(s) 57078.
----------------------------------------
Bug #13034: rb_enc_ascget() does not handle 'needmore' error from rb_enc_procise_mbclen()
https://bugs.ruby-lang.org/issues/13034#change-62275
* Author: Kazuki Yamaguchi
* Status: Closed
* Priority: Normal
* Assignee:
* Target version:
* ruby -v:
* Backport: 2.1: UNKNOWN, 2.2: DONE, 2.3: REQUIRED
----------------------------------------
rb_enc_ascget() stores the return value from rb_enc_procise_mbclen() that may return a negative value on error to 'unsigned int', and thus it overlooks errors due to incomplete UTF-16/32 byte sequence.
This bug is visible from Ruby; for example, the following code gets stuck in infinite loop:
~~~
str = "\x00".force_encoding("UTF-16BE")
Regexp.quote(str) # Ruby freezes
~~~
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>