Skip to content

Commit

Permalink
merge revision(s) 54172: [Backport #12192]
Browse files Browse the repository at this point in the history
	* 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]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@54275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
unak committed Mar 25, 2016
1 parent 477c282 commit 4e125b5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
@@ -1,3 +1,9 @@
Fri Mar 25 18:24:04 2016 Victor Nawothnig <Victor.Nawothnig@gmail.com>

* 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]

Fri Mar 25 18:18:29 2016 Eric Hodel <drbrain@segment7.net>

* marshal.c (r_object0): raise ArgumentError when linking to undefined
Expand Down
2 changes: 1 addition & 1 deletion parse.y
Expand Up @@ -6965,7 +6965,7 @@ parse_numvar(struct parser_params *parser)
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 */

Expand Down
2 changes: 1 addition & 1 deletion version.h
@@ -1,6 +1,6 @@
#define RUBY_VERSION "2.1.9"
#define RUBY_RELEASE_DATE "2016-03-25"
#define RUBY_PATCHLEVEL 472
#define RUBY_PATCHLEVEL 473

#define RUBY_RELEASE_YEAR 2016
#define RUBY_RELEASE_MONTH 3
Expand Down

0 comments on commit 4e125b5

Please sign in to comment.