ruby-changes:42308
From: naruse <ko1@a...>
Date: Tue, 29 Mar 2016 16:53:50 +0900 (JST)
Subject: [ruby-changes:42308] naruse:r54382 (ruby_2_3): merge revision(s) 54172: [Backport #12192]
naruse 2016-03-29 16:53:43 +0900 (Tue, 29 Mar 2016) New Revision: 54382 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54382 Log: merge revision(s) 54172: [Backport #12192] * parse.y (parse_numvar): NTH_REF must be less than a half of INT_MAX, as it is left-shifted to be ORed with back-ref flag. [ruby-core:74444] [Bug#12192] [Fix GH-1296] Modified directories: branches/ruby_2_3/ Modified files: branches/ruby_2_3/ChangeLog branches/ruby_2_3/parse.y branches/ruby_2_3/version.h Index: ruby_2_3/ChangeLog =================================================================== --- ruby_2_3/ChangeLog (revision 54381) +++ ruby_2_3/ChangeLog (revision 54382) @@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/ChangeLog#L1 +Tue Mar 29 16:45:58 2016 Victor Nawothnig <Victor.Nawothnig@g...> + + * parse.y (parse_numvar): NTH_REF must be less than a half of + INT_MAX, as it is left-shifted to be ORed with back-ref flag. + [ruby-core:74444] [Bug#12192] [Fix GH-1296] + Tue Mar 29 16:44:54 2016 NARUSE, Yui <naruse@r...> * enc/trans/JIS: update Unicode's notice. [Bug #11844] Index: ruby_2_3/parse.y =================================================================== --- ruby_2_3/parse.y (revision 54381) +++ ruby_2_3/parse.y (revision 54382) @@ -7824,7 +7824,7 @@ parse_numvar(struct parser_params *parse https://github.com/ruby/ruby/blob/trunk/ruby_2_3/parse.y#L7824 int overflow; unsigned long n = ruby_scan_digits(tok()+1, toklen()-1, 10, &len, &overflow); const unsigned long nth_ref_max = - (FIXNUM_MAX / 2 < INT_MAX) ? FIXNUM_MAX / 2 : INT_MAX; + ((FIXNUM_MAX < INT_MAX) ? FIXNUM_MAX : INT_MAX) >> 1; /* NTH_REF is left-shifted to be ORed with back-ref flag and * turned into a Fixnum, in compile.c */ Index: ruby_2_3/version.h =================================================================== --- ruby_2_3/version.h (revision 54381) +++ ruby_2_3/version.h (revision 54382) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/version.h#L1 #define RUBY_VERSION "2.3.0" #define RUBY_RELEASE_DATE "2016-03-29" -#define RUBY_PATCHLEVEL 39 +#define RUBY_PATCHLEVEL 40 #define RUBY_RELEASE_YEAR 2016 #define RUBY_RELEASE_MONTH 3 Property changes on: ruby_2_3 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r54172 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/