[ruby-cvs:64386] usa:r57220 (ruby_2_2): merge revision(s) 57119: [Backport #13052]

usa at ruby-lang.org usa at ruby-lang.org
Tue Dec 27 20:03:50 JST 2016


usa	2016-12-27 20:03:50 +0900 (Tue, 27 Dec 2016)

  New Revision: 57220

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

  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_2/
  Modified files:
    branches/ruby_2_2/ChangeLog
    branches/ruby_2_2/array.c
    branches/ruby_2_2/test/ruby/test_array.rb
    branches/ruby_2_2/version.h


More information about the ruby-cvs mailing list