Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-3476

New CDATA fast filter throws Exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.0.12
    • 2.0.13, 2.1.7
    • JSR-314
    • None
    • MyFaces 2.0.12, Richfaces 4.1.0.Final, Tomcat 6, Linux

    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

          Activity

            People

              lu4242 Leonardo Uribe
              jgoodfe James G
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: