You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by tn...@apache.org on 2002/09/16 22:37:33 UTC
cvs commit: xml-xerces/c/src/xercesc/internal XMLScanner.cpp
tng 2002/09/16 13:37:33
Modified: c/src/xercesc/internal XMLScanner.cpp
Log:
Infinite loop for malformed xml (e.g. simple has "XXXX") w/ setexitonfirstfatal(false).
Revision Changes Path
1.21 +7 -8 xml-xerces/c/src/xercesc/internal/XMLScanner.cpp
Index: XMLScanner.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/xercesc/internal/XMLScanner.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- XMLScanner.cpp 27 Aug 2002 05:56:39 -0000 1.20
+++ XMLScanner.cpp 16 Sep 2002 20:37:33 -0000 1.21
@@ -2208,11 +2208,6 @@
// Loop through the prolog. If there is no content, this could go all
// the way to the end of the file.
//
- // Note that we use a double loop here to avoid the overhead of the
- // setup/teardown of the exception handler on each loop.
- //
- while (true)
- {
try
{
while (true)
@@ -2292,7 +2287,12 @@
else
{
emitError(XMLErrs::InvalidDocumentStructure);
- fReaderMgr.skipPastChar(chCloseAngle);
+
+ // Watch for end of file and break out
+ if (!nextCh)
+ break;
+ else
+ fReaderMgr.skipPastChar(chCloseAngle);
}
}
@@ -2310,7 +2310,6 @@
XMLErrs::UnexpectedEOE
, "in prolog"
);
- }
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org