You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2016/05/31 20:37:13 UTC

[jira] [Commented] (AMQCPP-598) CmsTemplate::createConsumer possible dereference of null pointer

    [ https://issues.apache.org/jira/browse/AMQCPP-598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15308573#comment-15308573 ] 

ASF subversion and git services commented on AMQCPP-598:
--------------------------------------------------------

Commit 4754bb810f171f2a180b96c2a87b19afd1458016 in activemq-cpp's branch refs/heads/master from [~tabish121]
[ https://git-wip-us.apache.org/repos/asf?p=activemq-cpp.git;h=4754bb8 ]

https://issues.apache.org/jira/browse/AMQCPP-598

Add null check

> CmsTemplate::createConsumer possible dereference of null pointer
> ----------------------------------------------------------------
>
>                 Key: AMQCPP-598
>                 URL: https://issues.apache.org/jira/browse/AMQCPP-598
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>            Reporter: Daniel L. Robertson
>            Assignee: Timothy Bish
>            Priority: Minor
>         Attachments: CmsTemplate.cpp.patch
>
>
> If `CMSTemplate::takeSession()` returns NULL in `CMSTemplate::execute`, it is dereferenced in `CmsTemplate::createConsumer`. As far as I could tell, this is a plausible scenario, but I could be wrong. It looks like `ProducerExecutor::doInCms` checks for a NULL session, but `ReceiveExecutor::doInCms` does not. If this is because it is known that the session cannot be NULL, please close this issue. It just looked a bit off to me.



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