xerces-j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xerces-j-...@xml.apache.org
Subject [jira] Commented: (XERCESJ-1009) endless loop with broken document that contains CDATA section
Date Wed, 08 Sep 2004 15:17:37 GMT
The following comment has been added to this issue:

     Author: Daniel Naber
    Created: Wed, 8 Sep 2004 8:17 AM
       Body:
I just re-checked this and I think I confused the *.jar files so I didn't really test 2.6.2.
With 2.6.2 it seems to work. I think you can close this bug, sorry.
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/XERCESJ-1009?page=comments#action_52963

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/XERCESJ-1009

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XERCESJ-1009
    Summary: endless loop with broken document that contains CDATA section
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: Xerces2-J
   Versions:
             2.6.2

   Assignee: 
   Reporter: Daniel Naber

    Created: Wed, 8 Sep 2004 3:37 AM
    Updated: Wed, 8 Sep 2004 8:17 AM
Environment: Suse Linux 8.2, Java 1.4.1

Description:
This code will run into an endless loop trying to parse the (broken) XML. I'd expect an exception
instead.

import java.io.IOException;
import java.io.Reader;
import java.io.StringReader;

import org.apache.xerces.parsers.SAXParser;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.XMLReader;

public class XMLTest {

  public static void main(String[] args) throws IOException, SAXException {
    XMLReader xr = new SAXParser();
    String s = "<t><![CDATA[X]";    // endless loop
    //String s = "<t><![CDATA[X";    // this works, i.e. throws exception
    Reader r = new StringReader(s);
    System.out.println("parsing...");
    xr.parse(new InputSource(r));
    System.out.println("done.");
  }
  
}



---------------------------------------------------------------------
JIRA INFORMATION:
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

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


Mime
View raw message