Details
Description
When the filter (CDataEndEscapeFilterWriter) parses 2 CDATA End tags, it passes an incorrect length to the writer throwing an exception further down the stack. The incorrect length comes from the method write(char[] cbuf, int off, int len). On the second match of the end tag the (offset+length) passed to the super.write can be greater than the (offset+length) passed to the method. Suggested fix:
change index = i+1; to index = off+i+1; and
change super.write(cbuf, index, i+1);
to super.write(cbuf, index, i+1 - ( index - off ) );
Attachments
Issue Links
- relates to
-
MYFACES-3449 [perf] replace buffer in PartialResponseWriter implementation with a fast filter
- Closed