Return-Path: Delivered-To: apmail-ws-axis-c-dev-archive@www.apache.org Received: (qmail 10058 invoked from network); 27 May 2008 04:38:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 May 2008 04:38:29 -0000 Received: (qmail 22127 invoked by uid 500); 27 May 2008 04:38:30 -0000 Delivered-To: apmail-ws-axis-c-dev-archive@ws.apache.org Received: (qmail 22107 invoked by uid 500); 27 May 2008 04:38:30 -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 22096 invoked by uid 99); 27 May 2008 04:38:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 May 2008 21:38:30 -0700 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; Tue, 27 May 2008 04:37:36 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id A0196234C127 for ; Mon, 26 May 2008 21:37:57 -0700 (PDT) Message-ID: <666137069.1211863077654.JavaMail.jira@brutus> Date: Mon, 26 May 2008 21:37:57 -0700 (PDT) From: "S.Uthaiyashankar (JIRA)" To: axis-c-dev@ws.apache.org Subject: [jira] Assigned: (AXIS2C-976) base64 encode length returns size of encoded string + 1. In-Reply-To: <7590094.1202490728736.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-976?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] S.Uthaiyashankar reassigned AXIS2C-976: --------------------------------------- Assignee: S.Uthaiyashankar > base64 encode length returns size of encoded string + 1. > -------------------------------------------------------- > > Key: AXIS2C-976 > URL: https://issues.apache.org/jira/browse/AXIS2C-976 > Project: Axis2-C > Issue Type: Bug > Affects Versions: 1.3.0 > Reporter: Senaka Fernando > Assignee: S.Uthaiyashankar > > base64 encode length returns size of encoded string + 1, which is incorrect. This is because we assume that someone expects the length + 1 to accommodate '\0' that we add. But, if we gave the same string to a strlen() it returns size of encoded string. This would confuse a potential user. > axutil_base64_encode (encoded, "senaka", 6) = 9, and strlen(encoded) = 8. Also, axutil_base64_encode_len(6) = 9. > Therefore, I think it is better to stick to the strlen() way, especially because popular libraries and resources adopt that strategy. Refer [1] for more information. > [1] http://www.obviex.com/Articles/CiphertextSize.aspx > Regards, > Senaka -- 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