[ 
https://issues.apache.org/jira/browse/WW-4383?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14085840#comment-14085840
 ] 

Lukasz Lenart commented on WW-4383:
-----------------------------------

Is it something that can happened during processing Http request or what?

> An infinite loop occurs in FastByteArrayOutputStream.java. 
> -----------------------------------------------------------
>
>                 Key: WW-4383
>                 URL: https://issues.apache.org/jira/browse/WW-4383
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.3.16.3
>            Reporter: Suzuki Yoshifumi
>            Priority: Minor
>             Fix For: 2.3.18
>
>   Original Estimate: 672h
>  Remaining Estimate: 672h
>
> An infinite loop occurs in FastByteArrayOutputStream.java. 
> The conditions which an infinite loop generates are as follows. 
> - The character code of input data is UTF-8. 
> - The length of input data is longer than 16 KB. 
> - There is a character of a surrogate pair after 16 KB of input data. 
> - Example of input data:
> The input data to reproduce repeats 3 bytes of character 5462 times, and the 
> character of a surrogate pair appears behind that.
> - Cause
> Is clean of the out buffer necessary for decodeAndWritw method after the 
> output in an out buffer?
> {code:java}  
> private static CoderResult decodeAndWrite(Writer writer, ByteBuffer in, 
> CharBuffer out, CharsetDecoder decoder, boolean endOfInput) throws 
> IOException {
>     CoderResult result = decoder.decode(in, out, endOfInput);
>     // To begin of decoded data
>     out.flip();
>     // Output
>     writer.write(out.toString());
>     return result;
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to