[
https://issues.apache.org/jira/browse/GEODE-5985?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16677149#comment-16677149
]
ASF subversion and git services commented on GEODE-5985:
--------------------------------------------------------
Commit 86c86ac6bfd4fbb19d383260f1f7193532082f1a in geode's branch
refs/heads/develop from [~bschuchardt]
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=86c86ac ]
GEODE-5985 Possible integer overflow
We had a number of calculations that were taking place with ints instead
of longs. I've modified them to, in most places, just add an L to the
constant multiplier. In other places I had to change a variable type
from int to long.
There were a few places that were also assigning a long to an int
variable or an int to a byte variable. In these I added bit AND
operators to reduce the chances of overflow.
IndexElemArray needed a lot of work due to its "size" instvar being
a byte.
This closes #2783
> Possible integer overflow before assigning result to a long variable
> --------------------------------------------------------------------
>
> Key: GEODE-5985
> URL: https://issues.apache.org/jira/browse/GEODE-5985
> Project: Geode
> Issue Type: Bug
> Reporter: Bruce Schuchardt
> Assignee: Bruce Schuchardt
> Priority: Major
> Labels: pull-request-available
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> There are many places where we are performing a calculation on an int
> variable and then storing the result in a long variable. For instance,
> long milliseconds = intVariable * 1000;
> For correctness we should cast the int variable to a long or add an L to the
> numeric multiplier.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)