ruby-changes:52898
From: usa <ko1@a...>
Date: Wed, 17 Oct 2018 17:15:50 +0900 (JST)
Subject: [ruby-changes:52898] usa:r65111 (ruby_2_4): merge revision(s) 64915: [Backport #15205]
usa 2018-10-17 17:15:47 +0900 (Wed, 17 Oct 2018) New Revision: 65111 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=65111 Log: merge revision(s) 64915: [Backport #15205] check argument type. * iseq.c (iseqw_s_compile): check argument type (T_STRING) to avoid SEGV. Modified directories: branches/ruby_2_4/ Modified files: branches/ruby_2_4/iseq.c branches/ruby_2_4/version.h Index: ruby_2_4/iseq.c =================================================================== --- ruby_2_4/iseq.c (revision 65110) +++ ruby_2_4/iseq.c (revision 65111) @@ -793,9 +793,14 @@ iseqw_s_compile(int argc, VALUE *argv, V https://github.com/ruby/ruby/blob/trunk/ruby_2_4/iseq.c#L793 case 3: path = argv[--i]; case 2: file = argv[--i]; } + if (NIL_P(file)) file = rb_fstring_cstr("<compiled>"); + if (NIL_P(path)) path = file; if (NIL_P(line)) line = INT2FIX(1); + Check_Type(path, T_STRING); + Check_Type(file, T_STRING); + return iseqw_new(rb_iseq_compile_with_option(src, file, path, line, 0, opt)); } Index: ruby_2_4/version.h =================================================================== --- ruby_2_4/version.h (revision 65110) +++ ruby_2_4/version.h (revision 65111) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_4/version.h#L1 #define RUBY_VERSION "2.4.5" #define RUBY_RELEASE_DATE "2018-10-17" -#define RUBY_PATCHLEVEL 325 +#define RUBY_PATCHLEVEL 326 #define RUBY_RELEASE_YEAR 2018 #define RUBY_RELEASE_MONTH 10 Index: ruby_2_4 =================================================================== --- ruby_2_4 (revision 65110) +++ ruby_2_4 (revision 65111) Property changes on: ruby_2_4 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /trunk:r64915 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/