You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2002/08/02 12:07:47 UTC

DO NOT REPLY [Bug 11406] New: - SAXParser infinite loop with missing CDATA close brackets and end of stream

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11406>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11406

SAXParser infinite loop with missing CDATA close brackets and end of stream

           Summary: SAXParser infinite loop with missing CDATA close
                    brackets and end of stream
           Product: Xerces2-J
           Version: 2.0.2
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: Major
          Priority: Other
         Component: SAX
        AssignedTo: xerces-j-dev@xml.apache.org
        ReportedBy: tony.nys@aditel.be
                CC: tony.nys@aditel.be


SAXParser infinite loop with missing CDATA close brackets: 100% cpu
tested on winXP / Solaris 9

if you launch SAXParser.parse() with this data ("0]" are the last 2 bytes):
<?xml version="1.0" encoding="UTF-8"?>
<JCDOCUMENT><AUDITRECORD><auditno><![CDATA[0]

it will be infinite loop because the data is incomplete

bug in EntityScanner line 3280
        private final boolean load(int offset, boolean changeEntity)


extract from -Xrunhprof:

   1 63.27% 63.27%      93    65 java.io.FileInputStream.readBytes
   2 14.97% 78.23%      22    67 java.io.FileInputStream.readBytes
   3  3.40% 81.63%       5    71 
org.apache.xerces.impl.XMLEntityManager$EntityScanner.scanData

TRACE 71:
	org.apache.xerces.impl.XMLEntityManager$EntityScanner.scanData
(XMLEntityManager.java:2699)
	org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanCDATASection
(XMLDocumentFragmentScannerImpl.java:894)

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