[ruby-cvs:64516] nagachika:r57350 (ruby_2_3): merge revision(s) 57119: [Backport #13052]

nagachika at ruby-lang.org nagachika at ruby-lang.org
Tue Jan 17 04:46:03 JST 2017


nagachika	2017-01-17 04:46:03 +0900 (Tue, 17 Jan 2017)

  New Revision: 57350

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

  Log:
    merge revision(s) 57119: [Backport #13052]
    
    array.c: check array length every time after yielding
    
    Since the Array may be modified during rb_yield(), the length before
    invoking the block can't be trusted. Fix possible out-of-bounds read in
    Array#combination and Array#repeated_combination.
    
    It may better to make a defensive copy of the Array, but for now let's
    follow what Array#permutation does.  [ruby-core:78738] [Bug #13052]

  Modified directories:
    branches/ruby_2_3/
  Modified files:
    branches/ruby_2_3/array.c
    branches/ruby_2_3/test/ruby/test_array.rb
    branches/ruby_2_3/version.h


More information about the ruby-cvs mailing list