8281093: Violating Attribute-Value Normalization in the XML specification 1.0

Reviewed-by: joehw
This commit is contained in:
Ravi Reddy 2022-03-07 19:36:54 +00:00 committed by Joe Wang
parent 2e298b8bf4
commit 3996782c5a

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved.
*/
/*
@ -57,7 +57,7 @@ import java.util.Locale;
* @author Arnaud Le Hors, IBM
* @author K.Venugopal Sun Microsystems
*
* @LastModified: Sep 2021
* @LastModified: Mar 2022
*/
public class XMLEntityScanner implements XMLLocator {
@ -2162,7 +2162,7 @@ public class XMLEntityScanner implements XMLLocator {
break;
}
}
if (c == '\r') {
if (c == '\r' && isExternal) {
int cc = fCurrentEntity.ch[fCurrentEntity.position];
if (cc == '\n' || (version == XML_VERSION_1_1 && cc == 0x85)) {
fCurrentEntity.position++;