Return-Path: Delivered-To: apmail-geronimo-activemq-dev-archive@www.apache.org Received: (qmail 8982 invoked from network); 25 Jul 2006 08:54:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 25 Jul 2006 08:54:05 -0000 Received: (qmail 5115 invoked by uid 500); 25 Jul 2006 08:54:05 -0000 Delivered-To: apmail-geronimo-activemq-dev-archive@geronimo.apache.org Received: (qmail 5000 invoked by uid 500); 25 Jul 2006 08:54:04 -0000 Mailing-List: contact activemq-dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-dev@geronimo.apache.org Delivered-To: mailing list activemq-dev@geronimo.apache.org Received: (qmail 4986 invoked by uid 99); 25 Jul 2006 08:54:04 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Jul 2006 01:54:04 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Jul 2006 01:54:03 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 65EFB71428E for ; Tue, 25 Jul 2006 08:51:44 +0000 (GMT) Message-ID: <17132960.1153817504414.JavaMail.jira@brutus> Date: Tue, 25 Jul 2006 01:51:44 -0700 (PDT) From: "james strachan (JIRA)" To: activemq-dev@geronimo.apache.org Subject: [jira] Assigned: (AMQ-824) Missing NULL pointer check in MessageConsumer::autoAcknowledge In-Reply-To: <712314.1152878543102.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ https://issues.apache.org/activemq/browse/AMQ-824?page=all ] james strachan reassigned AMQ-824: ---------------------------------- Assignee: Nathan Mittler > Missing NULL pointer check in MessageConsumer::autoAcknowledge > --------------------------------------------------------------- > > Key: AMQ-824 > URL: https://issues.apache.org/activemq/browse/AMQ-824 > Project: ActiveMQ > Issue Type: Bug > Components: CMS (C++ client) > Affects Versions: incubation > Environment: RHEL ES 4/32bit > Reporter: Radek Sedmak > Assigned To: Nathan Mittler > Original Estimate: 10 minutes > Remaining Estimate: 10 minutes > > When you call consumer->receive() on empty queue receive method returns NULL message but before return MessageConsumer::autoAcknowledge method is invoked. This method doesn't check message against NULL, this cause coredump is message is NULL. > Patch: > p MessageConsumer::autoAcknowledge(p message) > { > try > { > if ( message != NULL ) { // <------ Check NULL here !!!!! > // Is the message an ActiveMQMessage? (throws bad_cast otherwise) > p activeMessage = p_dyncast (message) ; > // Register the handler for client acknowledgment > activeMessage->setAcknowledger( smartify(this) ) ; > if( acknowledgementMode != ClientAckMode ) > doAcknowledge(activeMessage) ; > } > } > catch( bad_cast& bc ) > { > // ignore > } > return message ; -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/activemq/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira