Return-Path: Delivered-To: apmail-ws-axis-c-dev-archive@www.apache.org Received: (qmail 17394 invoked from network); 13 Sep 2005 02:23:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 13 Sep 2005 02:23:33 -0000 Received: (qmail 86515 invoked by uid 500); 13 Sep 2005 02:23:33 -0000 Delivered-To: apmail-ws-axis-c-dev-archive@ws.apache.org Received: (qmail 86502 invoked by uid 500); 13 Sep 2005 02:23:32 -0000 Mailing-List: contact axis-c-dev-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: "Apache AXIS C Developers List" Reply-To: "Apache AXIS C Developers List" Delivered-To: mailing list axis-c-dev@ws.apache.org Received: (qmail 86489 invoked by uid 99); 13 Sep 2005 02:23:32 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=SPF_FAIL X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Sep 2005 19:23:31 -0700 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 83D0827E for ; Tue, 13 Sep 2005 04:23:30 +0200 (CEST) Message-ID: <645286557.1126578210536.JavaMail.jira@ajax.apache.org> Date: Tue, 13 Sep 2005 04:23:30 +0200 (CEST) From: "Henrik Nordberg (JIRA)" To: axis-c-dev@ws.apache.org Subject: [jira] Created: (AXISCPP-826) Apache2Transport::getBytes() may lead to access violation Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 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 Apache2Transport::getBytes() may lead to access violation --------------------------------------------------------- Key: AXISCPP-826 URL: http://issues.apache.org/jira/browse/AXISCPP-826 Project: Axis-C++ Type: Bug Components: Transport (Server), Transport (axis2), Server - Apache module Versions: unspecified Reporter: Henrik Nordberg You can't use a function like strstr() on a non-null terminated string, such as the buffer filled by ap_get_client_block(). This is done in Apache2Transport::getBytes() in Apache2Transport.cpp, where the following code is copied from: len_read = ap_get_client_block((request_rec*) m_pContext, pBuffer, *piSize); if (strstr(pBuffer, "Content-Id")) { pAttachmentHelper = new AttachmentHelper(); ... pBuffer must be terminated with a '\0' before you can use it in a call to strstr(). So maybe that if(strstr... block should be moved down to just before return TRANSPORT_FINISHED; ? I am not sure of the intention of the code, so the author should make the decision. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira