Skip to content

fix potential int overflow#5442

Merged
kares merged 1 commit intojruby:masterfrom
ahorek:int_overflow
Nov 12, 2018
Merged

fix potential int overflow#5442
kares merged 1 commit intojruby:masterfrom
ahorek:int_overflow

Conversation

@ahorek
Copy link
Contributor

@ahorek ahorek commented Nov 12, 2018

long ms = int * int + int;

the multiplication is evaluated using int arithmetic even if you expect long

@kares kares added this to the JRuby 9.2.4.0 milestone Nov 12, 2018
@kares kares merged commit 1c538d5 into jruby:master Nov 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants