activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Justin Bertram (JIRA)" <>
Subject [jira] [Resolved] (ARTEMIS-1135) Overflows during integer addition or multiplication
Date Mon, 08 May 2017 17:29:04 GMT


Justin Bertram resolved ARTEMIS-1135.
       Resolution: Fixed
    Fix Version/s:

> Overflows during integer addition or multiplication
> ---------------------------------------------------
>                 Key: ARTEMIS-1135
>                 URL:
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>    Affects Versions: 2.0.0
>            Reporter: Aditya Sharad
>             Fix For:
> The "Result of integer multiplication cast to long" and "Implicit narrowing conversion
in compound assignment" rules at
detect multiple instances of potential overflow during integer addition or multiplication.

> The first rule detects two instances where the result of the multiplication is cast to
{{long}}, but the individual operands are {{int}}s. This may lead to overflow during the multiplication.
> - In {{MySQLSQLProvider}}, this occurs when setting the max blob size, which overflows
to zero at runtime rather than the intended 4GB.
> - In {{MQTTProtocolHandler}}, this occurs when determining the time to keep the connection
> The second rule detects two instances where a {{long}} value is added to an {{int}}-valued
variable, forcing implicit conversion and possibly overflow.
> - In {{AddressControlImpl}}, queue message counts are {{longs}} but added up in an {{int}}.
> - In {{MessageCounter.DayCounter}}, the {{counters}} array elements will have {{long}}
message counts added to them, and so should be of type {{long}}.

This message was sent by Atlassian JIRA

View raw message