myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (Resolved) (JIRA)" <...@myfaces.apache.org>
Subject [jira] [Resolved] (MYFACES-3476) New CDATA fast filter throws Exception
Date Sat, 25 Feb 2012 16:39:48 GMT

     [ https://issues.apache.org/jira/browse/MYFACES-3476?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Leonardo Uribe resolved MYFACES-3476.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.1.7
                   2.0.13
         Assignee: Leonardo Uribe

Thanks to James G for provide this patch
                
> New CDATA fast filter throws Exception
> --------------------------------------
>
>                 Key: MYFACES-3476
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3476
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-314
>    Affects Versions: 2.0.12
>         Environment: MyFaces 2.0.12, Richfaces 4.1.0.Final, Tomcat 6, Linux
>            Reporter: James G
>            Assignee: Leonardo Uribe
>            Priority: Critical
>             Fix For: 2.0.13, 2.1.7
>
>
> 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 ) );

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message