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

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

Martin Styk created ARTEMIS-713:
-----------------------------------

             Summary: 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
            Reporter: Martin Styk
            Priority: Trivial


_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)