changeset 1518:ae0d2483853a icedtea-2.6.23 icedtea-2.6.24pre00

Merge jdk7u271-ga
author Andrew John Hughes <gnu.andrew@redhat.com>
date Thu, 03 Sep 2020 04:06:32 +0100
parents 4c3e58f5065a (current diff) 207acd382e8e (diff)
children a628d1efac5a
files .hgtags src/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java src/com/sun/org/apache/xerces/internal/impl/XMLScanner.java src/com/sun/org/apache/xerces/internal/impl/dtd/DTDGrammar.java src/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaValidator.java
diffstat 6 files changed, 106 insertions(+), 66 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Sat Apr 18 19:25:54 2020 +0100
+++ b/.hgtags	Thu Sep 03 04:06:32 2020 +0100
@@ -727,3 +727,7 @@
 e99cfdaca0e1e60c9dd2c52543c3a3dc262cbf94 icedtea-2.6.22
 e99cfdaca0e1e60c9dd2c52543c3a3dc262cbf94 icedtea-2.6.23pre00
 099ed3ab64156f2311c780e3d65e68be772f0737 icedtea-2.6.22pre00
+bdd256b2723fde22d3c49ad5e259788f73ae81c6 jdk7u261-ga
+bdd256b2723fde22d3c49ad5e259788f73ae81c6 jdk7u271-b00
+9628a194effb72c1755bcd21f55e0a256475d60e jdk7u271-b01
+9628a194effb72c1755bcd21f55e0a256475d60e jdk7u271-ga
--- a/THIRD_PARTY_README	Sat Apr 18 19:25:54 2020 +0100
+++ b/THIRD_PARTY_README	Thu Sep 03 04:06:32 2020 +0100
@@ -1001,67 +1001,97 @@
 
 -------------------------------------------------------------------------------
 
-%% This notice is provided with respect to libpng 1.6.16, which is 
+%% This notice is provided with respect to libpng 1.6.37, which may be
 included with JRE 7, JDK 7, and OpenJDK 7.
 
 --- begin of LICENSE ---
 
-This copy of the libpng notices is provided for your convenience.  In case of
-any discrepancy between this copy and the notices in the file png.h that is
-included in the libpng distribution, the latter shall prevail.
-
-COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
-
-If you modify libpng you may insert additional notices immediately following
-this sentence.
-
-This code is released under the libpng license.
-
-libpng versions 1.2.6, August 15, 2004, through 1.6.16, December 22, 2014, are
-Copyright (c) 2004, 2006-2011 Glenn Randers-Pehrson, and are
+COPYRIGHT NOTICE, DISCLAIMER, and LICENSE
+=========================================
+
+PNG Reference Library License version 2
+---------------------------------------
+
+ * Copyright (c) 1995-2019 The PNG Reference Library Authors.
+ * Copyright (c) 2018-2019 Cosmin Truta.
+ * Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
+ * Copyright (c) 1996-1997 Andreas Dilger.
+ * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
+
+The software is supplied "as is", without warranty of any kind,
+express or implied, including, without limitation, the warranties
+of merchantability, fitness for a particular purpose, title, and
+non-infringement.  In no event shall the Copyright owners, or
+anyone distributing the software, be liable for any damages or
+other liability, whether in contract, tort or otherwise, arising
+from, out of, or in connection with the software, or the use or
+other dealings in the software, even if advised of the possibility
+of such damage.
+
+Permission is hereby granted to use, copy, modify, and distribute
+this software, or portions hereof, for any purpose, without fee,
+subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you
+    must not claim that you wrote the original software.  If you
+    use this software in a product, an acknowledgment in the product
+    documentation would be appreciated, but is not required.
+
+ 2. Altered source versions must be plainly marked as such, and must
+    not be misrepresented as being the original software.
+
+ 3. This Copyright notice may not be removed or altered from any
+    source or altered source distribution.
+
+
+PNG Reference Library License version 1 (for libpng 0.5 through 1.6.35)
+-----------------------------------------------------------------------
+
+libpng versions 1.2.6, August 15, 2004, through 1.6.35, July 15, 2018 are
+Copyright (c) 2004, 2006-2018 Glenn Randers-Pehrson, and are
 distributed according to the same disclaimer and license as libpng-1.2.5
 with the following individual added to the list of Contributing Authors
 
-   Cosmin Truta
+    Cosmin Truta
 
 libpng versions 1.0.7, July 1, 2000, through 1.2.5 - October 3, 2002, are
 Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are
 distributed according to the same disclaimer and license as libpng-1.0.6
 with the following individuals added to the list of Contributing Authors
 
-   Simon-Pierre Cadieux
-   Eric S. Raymond
-   Gilles Vollant
+    Simon-Pierre Cadieux
+    Eric S. Raymond
+    Gilles Vollant
 
 and with the following additions to the disclaimer:
 
-   There is no warranty against interference with your enjoyment of the
-   library or against infringement.  There is no warranty that our
-   efforts or the library will fulfill any of your particular purposes
-   or needs.  This library is provided with all faults, and the entire
-   risk of satisfactory quality, performance, accuracy, and effort is with
-   the user.
+    There is no warranty against interference with your enjoyment of
+    the library or against infringement.  There is no warranty that our
+    efforts or the library will fulfill any of your particular purposes
+    or needs.  This library is provided with all faults, and the entire
+    risk of satisfactory quality, performance, accuracy, and effort is
+    with the user.
 
 libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
 Copyright (c) 1998, 1999 Glenn Randers-Pehrson, and are
 distributed according to the same disclaimer and license as libpng-0.96,
 with the following individuals added to the list of Contributing Authors:
 
-   Tom Lane
-   Glenn Randers-Pehrson
-   Willem van Schaik
+    Tom Lane
+    Glenn Randers-Pehrson
+    Willem van Schaik
 
 libpng versions 0.89, June 1996, through 0.96, May 1997, are
 Copyright (c) 1996, 1997 Andreas Dilger
 Distributed according to the same disclaimer and license as libpng-0.88,
 with the following individuals added to the list of Contributing Authors:
 
-   John Bowler
-   Kevin Bracey
-   Sam Bushell
-   Magnus Holmgren
-   Greg Roelofs
-   Tom Tanner
+    John Bowler
+    Kevin Bracey
+    Sam Bushell
+    Magnus Holmgren
+    Greg Roelofs
+    Tom Tanner
 
 libpng versions 0.5, May 1995, through 0.88, January 1996, are
 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
@@ -1069,19 +1099,20 @@
 For the purposes of this copyright and license, "Contributing Authors"
 is defined as the following set of individuals:
 
-   Andreas Dilger
-   Dave Martindale
-   Guy Eric Schalnat
-   Paul Schmidt
-   Tim Wegner
-
-The PNG Reference Library is supplied "AS IS".  The Contributing Authors
-and Group 42, Inc. disclaim all warranties, expressed or implied,
-including, without limitation, the warranties of merchantability and of
-fitness for any purpose.  The Contributing Authors and Group 42, Inc.
-assume no liability for direct, indirect, incidental, special, exemplary,
-or consequential damages, which may result from the use of the PNG
-Reference Library, even if advised of the possibility of such damage.
+    Andreas Dilger
+    Dave Martindale
+    Guy Eric Schalnat
+    Paul Schmidt
+    Tim Wegner
+
+The PNG Reference Library is supplied "AS IS".  The Contributing
+Authors and Group 42, Inc. disclaim all warranties, expressed or
+implied, including, without limitation, the warranties of
+merchantability and of fitness for any purpose.  The Contributing
+Authors and Group 42, Inc. assume no liability for direct, indirect,
+incidental, special, exemplary, or consequential damages, which may
+result from the use of the PNG Reference Library, even if advised of
+the possibility of such damage.
 
 Permission is hereby granted to use, copy, modify, and distribute this
 source code, or portions hereof, for any purpose, without fee, subject
@@ -1121,7 +1152,7 @@
 
 -------------------------------------------------------------------------------
 
-%% This notice is provided with respect to libungif 4.1.3, which is 
+%% This notice is provided with respect to GIFLIB 5.2.1 & libungif 4.1.3, which is 
 included with JRE 7, JDK 7, and OpenJDK 7.
 
 --- begin of LICENSE ---
--- a/src/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java	Sat Apr 18 19:25:54 2020 +0100
+++ b/src/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java	Thu Sep 03 04:06:32 2020 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
  */
 
 /*
@@ -67,6 +67,7 @@
  * @author Eric Ye, IBM
  *
  * @version $Id: XMLDTDScannerImpl.java,v 1.8 2010-11-01 04:39:41 joehw Exp $
+ * @LastModified: Feb 2020
  */
 public class XMLDTDScannerImpl
 extends XMLScanner
@@ -601,6 +602,7 @@
         if (fScannerState == SCANNER_STATE_END_OF_INPUT)
             return;
 
+        boolean dtdEntity = name.equals("[dtd]");
         // Handle end of PE
         boolean reportEntity = fReportEntity;
         if (name.startsWith("%")) {
@@ -609,8 +611,7 @@
             int startMarkUpDepth = popPEStack();
             // throw fatalError if this entity was incomplete and
             // was a freestanding decl
-            if(startMarkUpDepth == 0 &&
-            startMarkUpDepth < fMarkUpDepth) {
+            if (startMarkUpDepth == 0 && startMarkUpDepth < fMarkUpDepth) {
                 fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
                 "ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL",
                 new Object[]{ fEntityManager.fCurrentEntity.name},
@@ -630,12 +631,10 @@
             if (fEntityScanner.isExternal()) {
                 fExtEntityDepth--;
             }
-        }
-
-        // call handler
-        boolean dtdEntity = name.equals("[dtd]");
-        if (fDTDHandler != null && !dtdEntity && reportEntity) {
-            fDTDHandler.endParameterEntity(name, null);
+            // call handler
+            if (fDTDHandler != null && reportEntity) {
+                fDTDHandler.endParameterEntity(name, null);
+            }
         }
 
         // end DTD
--- a/src/com/sun/org/apache/xerces/internal/impl/XMLScanner.java	Sat Apr 18 19:25:54 2020 +0100
+++ b/src/com/sun/org/apache/xerces/internal/impl/XMLScanner.java	Thu Sep 03 04:06:32 2020 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
  */
 
 /*
@@ -70,6 +70,7 @@
  * @author K.Venugopal SUN Microsystems
  * @author Sunitha Reddy, SUN Microsystems
  * @version $Id: XMLScanner.java,v 1.12 2010-11-01 04:39:41 joehw Exp $
+ * @LastModified: Feb 2020
  */
 public abstract class XMLScanner
         implements XMLComponent {
@@ -1241,10 +1242,10 @@
      * @throws XNIException Thrown by handler to signal an error.
      */
     public void endEntity(String name, Augmentations augs) throws IOException, XNIException {
-
         // keep track of the entity depth
-        fEntityDepth--;
-
+        if (fEntityDepth > 0) {
+            fEntityDepth--;
+        }
     } // endEntity(String)
 
     /**
--- a/src/com/sun/org/apache/xerces/internal/impl/dtd/DTDGrammar.java	Sat Apr 18 19:25:54 2020 +0100
+++ b/src/com/sun/org/apache/xerces/internal/impl/dtd/DTDGrammar.java	Thu Sep 03 04:06:32 2020 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -61,6 +61,7 @@
  * @author Neil Graham, IBM
  *
  * @version $Id: DTDGrammar.java,v 1.4 2010/08/11 07:18:37 joehw Exp $
+ * @LastModified: Feb 2020
  */
 public class DTDGrammar
     implements XMLDTDHandler, XMLDTDContentModelHandler, EntityState, Grammar {
@@ -445,9 +446,12 @@
      * @throws XNIException Thrown by handler to signal an error.
      */
     public void endParameterEntity(String name, Augmentations augs) throws XNIException {
-
-        fPEDepth--;
-        fReadingExternalDTD = fPEntityStack[fPEDepth];
+        // redundant check as this method can only be called after parsing a PE
+        // incomplete or truncated DTD get caught before reaching this method
+        if (fPEDepth > 0) {
+            fPEDepth--;
+            fReadingExternalDTD = fPEntityStack[fPEDepth];
+        }
 
     } // endParameterEntity(String,Augmentations)
 
--- a/src/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaValidator.java	Sat Apr 18 19:25:54 2020 +0100
+++ b/src/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaValidator.java	Thu Sep 03 04:06:32 2020 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2020, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -106,6 +106,7 @@
  * @author Andy Clark IBM
  * @author Neeraj Bajaj, Sun Microsystems, inc.
  * @version $Id: XMLSchemaValidator.java,v 1.16 2010-11-01 04:39:55 joehw Exp $
+ * @LastModified: Apr 2020
  */
 public class XMLSchemaValidator
     implements XMLComponent, XMLDocumentFilter, FieldActivator, RevalidationHandler {
@@ -1727,7 +1728,7 @@
 
         // root element
         if (fElementDepth == -1 && fValidationManager.isGrammarFound()) {
-            if (fSchemaType == null) {
+            if (fSchemaType == null && !fUseGrammarPoolOnly) {
                 // schemaType is not specified
                 // if a DTD grammar is found, we do the same thing as Dynamic:
                 // if a schema grammar is found, validation is performed;