Return-Path: Delivered-To: apmail-mina-dev-archive@www.apache.org Received: (qmail 43366 invoked from network); 12 Jan 2007 01:50:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Jan 2007 01:50:49 -0000 Received: (qmail 12379 invoked by uid 500); 12 Jan 2007 01:50:55 -0000 Delivered-To: apmail-mina-dev-archive@mina.apache.org Received: (qmail 12172 invoked by uid 500); 12 Jan 2007 01:50:55 -0000 Mailing-List: contact dev-help@mina.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@mina.apache.org Delivered-To: mailing list dev@mina.apache.org Received: (qmail 12159 invoked by uid 500); 12 Jan 2007 01:50:54 -0000 Delivered-To: apmail-directory-mina-dev@directory.apache.org Received: (qmail 12154 invoked by uid 99); 12 Jan 2007 01:50:54 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Jan 2007 17:50:54 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= 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, 11 Jan 2007 17:50:47 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 8504D7142F7 for ; Thu, 11 Jan 2007 17:50:27 -0800 (PST) Message-ID: <16749694.1168566627526.JavaMail.jira@brutus> Date: Thu, 11 Jan 2007 17:50:27 -0800 (PST) From: "Trustin Lee (JIRA)" To: mina-dev@directory.apache.org Subject: [jira] Closed: (DIRMINA-297) ObjectSerializationInputStream readObject is having wrong limit size leading to java.nio.BufferUnderflowException In-Reply-To: <2441784.1162218498251.JavaMail.root@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/DIRMINA-297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Trustin Lee closed DIRMINA-297. ------------------------------- Resolution: Duplicate Fix Version/s: 1.0.2 This issue has already been resolved in DIRMINA-321. > ObjectSerializationInputStream readObject is having wrong limit size leading to java.nio.BufferUnderflowException > ----------------------------------------------------------------------------------------------------------------- > > Key: DIRMINA-297 > URL: https://issues.apache.org/jira/browse/DIRMINA-297 > Project: MINA > Issue Type: Bug > Affects Versions: 1.0 > Environment: windows IBM jdk 1.4 , sun JDK 1.5 > Reporter: Gasser M. Abdallah > Priority: Blocker > Fix For: 1.0.2 > > > When trying to read an object from a classic client using the ObjectSerializationInputStream, I faced java.nio.BufferUnderflowException, > I reviewed the ObjectSerializationInputStream.readObject() code and found that the problem is in the line: > > buf.limit( objectSize ); > because the buffer limit should be set the objectSize + 4 ( four bytes for writing the size before the object bytes itself ) > so I made a simple change => "buf.limit( objectSize + 4);" > and everything went ok, therefore i believe this modification should be added to your next release. > Regards, > Gasser -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira