Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 28288 invoked from network); 1 Nov 2007 08:43:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Nov 2007 08:43:13 -0000 Received: (qmail 69760 invoked by uid 500); 1 Nov 2007 08:43:01 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 69740 invoked by uid 500); 1 Nov 2007 08:43:01 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 69727 invoked by uid 99); 1 Nov 2007 08:43:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Nov 2007 01:43:01 -0700 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; Thu, 01 Nov 2007 08:43:28 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 8AD227141FE for ; Thu, 1 Nov 2007 01:42:50 -0700 (PDT) Message-ID: <12385256.1193906570557.JavaMail.jira@brutus> Date: Thu, 1 Nov 2007 01:42:50 -0700 (PDT) From: "spark shen (JIRA)" To: commits@harmony.apache.org Subject: [jira] Created: (HARMONY-5054) [ASN.1] BerInputStream will incorrectly resize buffer when the enveloped InputStream has lots of bytes MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ASN.1] BerInputStream will incorrectly resize buffer when the enveloped InputStream has lots of bytes ------------------------------------------------------------------------------------------------------ Key: HARMONY-5054 URL: https://issues.apache.org/jira/browse/HARMONY-5054 Project: Harmony Issue Type: Bug Components: Classlib Reporter: spark shen I was writing scenario test for ldap service provider, and trying to extract schema information from an Openldap server. The response message is quite long - longer than the initial buffer size of BerInputStream. While decoding the reponse, I got the following exception: I believe the problem resides in a constructor: 137 if (buffer.length < length) { 138 byte[] newBuffer = new byte[length]; And they should be modified into if (buffer.length < (length + offset)) { byte[] newBuffer = new byte[length + offset]; It's hard to write a standalone test case, due to the large number of buffer size. Writing a scenario test would be simpler. I will provide my scenario test and patch soon. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.