# HG changeset patch # User asaha # Date 1245704190 25200 # Node ID c4483e76656e4369cad556c2c3e0f4c683c93346 # Parent faa3111c009cb619fc64ef6c53d11490dc2dc534 6845701: Xerces2 Java XML library infinite loop with malformed XML input Reviewed-by: hawtin diff -r faa3111c009c -r c4483e76656e jaxp/src/share/classes/com/sun/org/apache/xerces/internal/impl/XMLScanner.java --- a/jaxp/src/share/classes/com/sun/org/apache/xerces/internal/impl/XMLScanner.java Thu Jun 11 21:26:25 2009 -0700 +++ b/jaxp/src/share/classes/com/sun/org/apache/xerces/internal/impl/XMLScanner.java Mon Jun 22 13:56:30 2009 -0700 @@ -1027,6 +1027,9 @@ int c = fEntityScanner.peekChar(); if (XMLChar.isMarkup(c) || c == ']') { fStringBuffer.append((char)fEntityScanner.scanChar()); + } else if (c != -1 && isInvalidLiteral(c)) { + reportFatalError("InvalidCharInSystemID", + new Object[] {Integer.toString(c, 16)}); } } while (fEntityScanner.scanLiteral(quote, ident) != quote); fStringBuffer.append(ident);