directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Trustin Lee (JIRA)" <j...@apache.org>
Subject [jira] Closed: (DIRMINA-141) Infinite loop in ByteBuffer.get/putString()
Date Wed, 07 Dec 2005 16:51:08 GMT
     [ http://issues.apache.org/jira/browse/DIRMINA-141?page=all ]
     
Trustin Lee closed DIRMINA-141:
-------------------------------

    Resolution: Fixed

> Infinite loop in ByteBuffer.get/putString()
> -------------------------------------------
>
>          Key: DIRMINA-141
>          URL: http://issues.apache.org/jira/browse/DIRMINA-141
>      Project: Directory MINA
>         Type: Bug
>     Versions: 0.8, 0.8.1
>     Reporter: Trustin Lee
>     Assignee: Trustin Lee
>      Fix For: 0.8.2

>
> expectedLength local variable in ByteBuffer.get/putString() is sometimes calculated as
'0', and it causes infinite loop in case of buffer overflow:
> int expectedLength = (int) (in.remaining() * encoder.averageBytesPerChar());
> This problem can be fixed easily by adding 1 to expectedLength:
> int expectedLength = (int) (in.remaining() * encoder.averageBytesPerChar()) + 1;

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message