You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Trustin Lee (JIRA)" <ji...@apache.org> on 2007/01/12 02:50:27 UTC

[jira] Closed: (DIRMINA-297) ObjectSerializationInputStream readObject is having wrong limit size leading to java.nio.BufferUnderflowException

     [ 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