Return-Path: Delivered-To: apmail-ws-axis-c-dev-archive@www.apache.org Received: (qmail 48174 invoked from network); 4 Feb 2008 14:45:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Feb 2008 14:45:32 -0000 Received: (qmail 70160 invoked by uid 500); 4 Feb 2008 14:45:24 -0000 Delivered-To: apmail-ws-axis-c-dev-archive@ws.apache.org Received: (qmail 70019 invoked by uid 500); 4 Feb 2008 14:45:23 -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 70008 invoked by uid 99); 4 Feb 2008 14:45:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Feb 2008 06:45:23 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Feb 2008 14:45:16 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 4DC8A71406F for ; Mon, 4 Feb 2008 06:45:08 -0800 (PST) Message-ID: <11648099.1202136308315.JavaMail.jira@brutus> Date: Mon, 4 Feb 2008 06:45:08 -0800 (PST) From: "Bill Mitchell (JIRA)" To: axis-c-dev@ws.apache.org Subject: [jira] Updated: (AXIS2C-933) guththila parser does not handle incomplete messages well, leading to an infinite loop or seg fault In-Reply-To: <12620419.1201323334752.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/AXIS2C-933?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bill Mitchell updated AXIS2C-933: --------------------------------- Attachment: diff2.txt Supun, I see the cause of the confusion. When I uploaded a revised version of this patch, I mistakenly did not strip all the fixes to other modules from this patch. My bad. I've fixed that error in the diff2.txt file, so it is just this fix combined with the fix already applied later to guththila for AXIS2C-857. So you can examine this to see if anything strikes you as really odd. Later today, I should have a chance to rebuild the patch against the current guththila_xml_parser.c source, so the patch will then include just this fix and not AXIS2C-857. > guththila parser does not handle incomplete messages well, leading to an infinite loop or seg fault > --------------------------------------------------------------------------------------------------- > > Key: AXIS2C-933 > URL: https://issues.apache.org/jira/browse/AXIS2C-933 > Project: Axis2-C > Issue Type: Bug > Components: guththila > Affects Versions: Current (Nightly) > Environment: Windows XP, Visual Studio 2005, guththila, libcurl > Reporter: Bill Mitchell > Attachments: diff.txt, diff2.txt > > > The code in the guththila parser has a couple of problems when the first allocated buffer fills up and it attempts to read more data. First, when allocating another buffer it doubled the size of all the buffers allocated to this point, but then recorded the new buffer size as only equal to the size of all the previous buffers. Second, after fixing the buffer allocation issue, I discovered that the read into the buffer tried to read as much as all the buffers to date, instead of just the amount remaining in the buffer just allocated. There is also a subtle problem in the guththila_next_no_char routine if last_start is not set, that it did not assure that all the characters since next are moved to the newly allocated buffer. > While debugging this, because of other issues, I walked through the path of an unexpected EOF in the middle of the incoming message, and discovered that several while loops in the parser do not stop on EOF, but just keep reading and reading and reading... -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org For additional commands, e-mail: axis-c-dev-help@ws.apache.org