You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "clebert suconic (JIRA)" <ji...@apache.org> on 2016/09/07 13:14:20 UTC

[jira] [Closed] (ARTEMIS-713) Possible integer overflow in SubscriptionsResource.recreateTopicConsumer

     [ https://issues.apache.org/jira/browse/ARTEMIS-713?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

clebert suconic closed ARTEMIS-713.
-----------------------------------
    Resolution: Fixed

> Possible integer overflow in SubscriptionsResource.recreateTopicConsumer
> ------------------------------------------------------------------------
>
>                 Key: ARTEMIS-713
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-713
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 1.3.0, 1.4.0
>            Reporter: Martin Styk
>            Priority: Trivial
>             Fix For: 1.5.0
>
>
> _Code_
> {code:java}
> private QueueConsumer recreateTopicConsumer(String subscriptionId, boolean autoAck) {
>       QueueConsumer consumer;
>       if (subscriptionExists(subscriptionId)) {
>          QueueConsumer tmp = null;
>          try {
>                 tmp = createConsumer(true, autoAck, subscriptionId, null, consumerTimeoutSeconds * 1000, false);
>           }
> {code}
> _Issue_
> Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)overflow_before_widen: Potentially overflowing expression consumerTimeoutSeconds * 1000 with type int (32 bits, signed) is evaluated using 32-bit arithmetic, and then used in a context that expects an expression of type long (64 bits, signed).
>    To avoid overflow, cast either consumerTimeoutSeconds or 1000 to type long.
> This is small issue, but it is nice to have it fixed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)