mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "peter royal (JIRA)" <j...@apache.org>
Subject [jira] Created: (DIRMINA-186) ByteBuffer.putString() can loop endlessly with multi-byte UTF-8 characters
Date Tue, 07 Mar 2006 21:32:44 GMT
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    
    Reporter: peter royal
    Priority: Critical


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


Mime
View raw message