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 2006/03/11 17:17:42 UTC
[jira] Updated: (DIRMINA-186) ByteBuffer.putString() can loop
endlessly with multi-byte UTF-8 characters
[ http://issues.apache.org/jira/browse/DIRMINA-186?page=all ]
Trustin Lee updated DIRMINA-186:
--------------------------------
Fix Version: 0.9.3
Version: 0.9.2
0.9
Assign To: Trustin Lee
I checked in your fix and modified it a little bit.
The first change:
http://svn.apache.org/viewcvs?rev=385098&view=rev
The second change:
http://svn.apache.org/viewcvs?rev=385102&view=rev
Please review and close it if the fix is feasible.
> ByteBuffer.putString() can loop endlessly with multi-byte UTF-8 characters
> --------------------------------------------------------------------------
>
> Key: DIRMINA-186
> URL: http://issues.apache.org/jira/browse/DIRMINA-186
> Project: Directory MINA
> Type: Bug
> Versions: 0.9.1, 0.9.2, 0.9
> Reporter: peter royal
> Assignee: Trustin Lee
> Priority: Critical
> Fix For: 0.9.3
>
> If the ByteBuffer is sized just-right, attempting to put a multi-byte UTF-8 character will cause the code to loop endlessly.
> Attached is a test that will illustrate the issue, and a patch that first expands by the avgBytePerChar, then maxBytePerChar, then bails, to avoid a hang.
--
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