Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 53959 invoked from network); 15 Apr 2009 02:01:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 15 Apr 2009 02:01:53 -0000 Received: (qmail 76513 invoked by uid 500); 15 Apr 2009 02:01:52 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 76464 invoked by uid 500); 15 Apr 2009 02:01:52 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 76454 invoked by uid 99); 15 Apr 2009 02:01:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Apr 2009 02:01:52 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Apr 2009 02:01:52 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id B0D65234C044 for ; Tue, 14 Apr 2009 19:01:31 -0700 (PDT) Message-ID: <1152096845.1239760891722.JavaMail.jira@brutus> Date: Tue, 14 Apr 2009 19:01:31 -0700 (PDT) From: "Martin Schlapfer (JIRA)" To: dev@activemq.apache.org Subject: [jira] Commented: (AMQCPP-235) UTF8 length marshalling bug in openwire readString and writeString. In-Reply-To: <1792234955.1239209196648.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: ae95407df07c98740808b2ef9da0087c X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/AMQCPP-235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=51202#action_51202 ] Martin Schlapfer commented on AMQCPP-235: ----------------------------------------- Hi Tim, I'm out this week on vacation (checking email periodically). Next week, I'll take a close look at the changes and provide any feedback. Thanks! - Martin. > UTF8 length marshalling bug in openwire readString and writeString. > ------------------------------------------------------------------- > > Key: AMQCPP-235 > URL: https://issues.apache.org/activemq/browse/AMQCPP-235 > Project: ActiveMQ C++ Client > Issue Type: Bug > Components: Openwire > Environment: Windows XP / Visual Studio 2005 > Reporter: Martin Schlapfer > Assignee: Timothy Bish > Priority: Minor > Fix For: 2.2.6, 3.0 > > Attachments: OpenwireStringSupport.cpp.patch, OpenwireStringSupportTest.cpp.patch, OpenwireStringSupportTest.h.patch > > > In investigating a bug for the check "if( str->size() > 65536 )" which should be "if( str->size() > 65535 )" in writeString() , I found a couple of other problems: > (1) The OpenwireStringSupport::readString method should read the utf8 length as an unsigned short rather than short. The problem is that utf8 encoded strings (using writeString) longer than 32768 will become truncated when read back using readString(). > (2) The writeString() method should also check the value of utflen after determining the UTF8 length of the encoded string, since with the support of characters greater than value 127, encodings of 2 UTF8 bytes per byte can exist. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.