[ruby-cvs:64160] rhe:r56994 (trunk): re.c: check that MatchData is initialized

rhe at ruby-lang.org rhe at ruby-lang.org
Tue Dec 6 15:14:17 JST 2016


rhe	2016-12-06 15:14:17 +0900 (Tue, 06 Dec 2016)

  New Revision: 56994

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

  Log:
    re.c: check that MatchData is initialized
    
    Follow r16757 ("* re.c: fix SEGV by Regexp.allocate.names,
    Match.allocate.names, etc.", 2008-06-02). Don't do null dereference if
    MatchData#hash or #== is called against an uninitialized instance.

  Modified files:
    trunk/re.c
    trunk/test/ruby/test_regexp.rb


More information about the ruby-cvs mailing list