[ruby-cvs:64353] rhe:r57187 (trunk): pack.c: avoid returning uninitialized String

rhe at ruby-lang.org rhe at ruby-lang.org
Mon Dec 26 15:32:00 JST 2016


rhe	2016-12-26 15:32:00 +0900 (Mon, 26 Dec 2016)

  New Revision: 57187

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

  Log:
    pack.c: avoid returning uninitialized String
    
    Fix unpacking with 'b', 'B', 'h' and 'H' format. Do not return an
    uninitialized String to Ruby before filling the content bytes.
    Fixes r11175 ("pack.c (pack_unpack): execute block if given with
    unpacked value instead of creating an array", 2006-10-15).
    [ruby-core:78841] [Bug #13075]

  Modified files:
    trunk/pack.c
    trunk/test/ruby/test_pack.rb


More information about the ruby-cvs mailing list