[ruby-cvs:64514] nagachika:r57348 (ruby_2_3): merge revision(s) 57078: [Backport #13034]

nagachika at ruby-lang.org nagachika at ruby-lang.org
Tue Jan 17 04:31:25 JST 2017


nagachika	2017-01-17 04:31:25 +0900 (Tue, 17 Jan 2017)

  New Revision: 57348

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57348

  Log:
    merge revision(s) 57078: [Backport #13034]
    
    encoding.c: handle needmore error from rb_enc_precise_mbclen()
    
    rb_enc_ascget() erroneously reports success even if the given byte
    sequence is incomplete, for non-ASCII compatible encoding strings.
    
    rb_enc_precise_mbclen() may return a negative value on error, and thus
    rb_enc_ascget() must not store the return value in 'unsigned int';
    otherwise the subsequent MBCLEN_CHARFOUND_P() check won't catch the
    error.  [ruby-core:78646] [Bug #13034]

  Modified directories:
    branches/ruby_2_3/
  Modified files:
    branches/ruby_2_3/encoding.c
    branches/ruby_2_3/test/ruby/test_regexp.rb
    branches/ruby_2_3/version.h


More information about the ruby-cvs mailing list