Tue, 20 Feb 2018 13:00:02 -0800
Merge
.hgtags | file | annotate | diff | comparison | revisions |
1.1 --- a/.hgtags Tue Feb 13 12:56:23 2018 -0800 1.2 +++ b/.hgtags Tue Feb 20 13:00:02 2018 -0800 1.3 @@ -872,6 +872,7 @@ 1.4 0baf88a7b3880bbefdbb221e67a6ce96b0552033 jdk8u171-b04 1.5 0c6a772d60b94de90907f2f6d4683ceac8aba54b jdk8u171-b05 1.6 3bca003f024c7bb6774499ff2ede57d300c18c79 jdk8u171-b06 1.7 +b90a8fc589afa4ac20a4d1e4f819058a5730af9f jdk8u171-b07 1.8 72dbc8d63308f5b04b9fd3e06d139d673f992212 jdk8u172-b00 1.9 fbb7c1e76e59aabb85a70c81301f47b980f83225 jdk8u172-b01 1.10 56874ff37e89559692d1314d48cbab574544b677 jdk8u172-b02
2.1 --- a/make/BuildCorba.gmk Tue Feb 13 12:56:23 2018 -0800 2.2 +++ b/make/BuildCorba.gmk Tue Feb 20 13:00:02 2018 -0800 2.3 @@ -1,5 +1,5 @@ 2.4 # 2.5 -# Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. 2.6 +# Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved. 2.7 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 2.8 # 2.9 # This code is free software; you can redistribute it and/or modify it 2.10 @@ -174,7 +174,8 @@ 2.11 SETUP := GENERATE_NEWBYTECODE, \ 2.12 SRC := $(CORBA_TOPDIR)/src/share/classes $(CORBA_OUTPUTDIR)/gensrc $(CORBA_OUTPUTDIR)/logwrappers, \ 2.13 EXCLUDES := com/sun/corba/se/PortableActivationIDL \ 2.14 - com/sun/tools/corba/se/logutil, \ 2.15 + com/sun/tools/corba/se/logutil \ 2.16 + sun/misc, \ 2.17 EXCLUDE_FILES := com/sun/corba/se/impl/presentation/rmi/JNDIStateFactoryImpl.java \ 2.18 com/sun/corba/se/spi/presentation/rmi/StubWrapper.java \ 2.19 com/sun/org/omg/CORBA/IDLTypeOperations.java \
3.1 --- a/src/share/classes/com/sun/corba/se/impl/ior/StubIORImpl.java Tue Feb 13 12:56:23 2018 -0800 3.2 +++ b/src/share/classes/com/sun/corba/se/impl/ior/StubIORImpl.java Tue Feb 20 13:00:02 2018 -0800 3.3 @@ -1,5 +1,5 @@ 3.4 /* 3.5 - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. 3.6 + * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved. 3.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3.8 * 3.9 * This code is free software; you can redistribute it and/or modify it 3.10 @@ -34,7 +34,6 @@ 3.11 import java.io.ObjectInputStream ; 3.12 import java.io.ObjectOutputStream ; 3.13 import java.io.IOException ; 3.14 -import java.io.StringWriter ; 3.15 3.16 import org.omg.CORBA.ORB ; 3.17 3.18 @@ -47,6 +46,7 @@ 3.19 // other vendor's ORBs. 3.20 import com.sun.corba.se.spi.presentation.rmi.StubAdapter ; 3.21 import com.sun.corba.se.impl.orbutil.HexOutputStream ; 3.22 +import sun.corba.SharedSecrets; 3.23 3.24 /** 3.25 * This class implements a very simply IOR representation 3.26 @@ -125,14 +125,20 @@ 3.27 { 3.28 // read the IOR from the ObjectInputStream 3.29 int typeLength = stream.readInt(); 3.30 + SharedSecrets.getJavaOISAccess().checkArray(stream, byte[].class, typeLength); 3.31 typeData = new byte[typeLength]; 3.32 stream.readFully(typeData); 3.33 + 3.34 int numProfiles = stream.readInt(); 3.35 + SharedSecrets.getJavaOISAccess().checkArray(stream, int[].class, numProfiles); 3.36 + SharedSecrets.getJavaOISAccess().checkArray(stream, byte[].class, numProfiles); 3.37 profileTags = new int[numProfiles]; 3.38 profileData = new byte[numProfiles][]; 3.39 for (int i = 0; i < numProfiles; i++) { 3.40 profileTags[i] = stream.readInt(); 3.41 - profileData[i] = new byte[stream.readInt()]; 3.42 + int dataSize = stream.readInt(); 3.43 + SharedSecrets.getJavaOISAccess().checkArray(stream, byte[].class, dataSize); 3.44 + profileData[i] = new byte[dataSize]; 3.45 stream.readFully(profileData[i]); 3.46 } 3.47 }
4.1 --- a/src/share/classes/sun/corba/SharedSecrets.java Tue Feb 13 12:56:23 2018 -0800 4.2 +++ b/src/share/classes/sun/corba/SharedSecrets.java Tue Feb 20 13:00:02 2018 -0800 4.3 @@ -1,5 +1,5 @@ 4.4 /* 4.5 - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. 4.6 + * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved. 4.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4.8 * 4.9 * This code is free software; you can redistribute it and/or modify it 4.10 @@ -26,8 +26,10 @@ 4.11 package sun.corba; 4.12 4.13 import com.sun.corba.se.impl.io.ValueUtility; 4.14 +import sun.misc.JavaOISAccess; 4.15 import sun.misc.Unsafe; 4.16 4.17 +import java.io.ObjectInputStream; 4.18 import java.security.AccessController; 4.19 4.20 /** A repository of "shared secrets", which are a mechanism for 4.21 @@ -43,6 +45,7 @@ 4.22 public class SharedSecrets { 4.23 private static final Unsafe unsafe = Unsafe.getUnsafe(); 4.24 private static JavaCorbaAccess javaCorbaAccess; 4.25 + private static JavaOISAccess javaOISAccess; 4.26 4.27 public static JavaCorbaAccess getJavaCorbaAccess() { 4.28 if (javaCorbaAccess == null) { 4.29 @@ -57,4 +60,15 @@ 4.30 javaCorbaAccess = access; 4.31 } 4.32 4.33 + public static void setJavaOISAccess(JavaOISAccess access) { 4.34 + javaOISAccess = access; 4.35 + } 4.36 + 4.37 + public static JavaOISAccess getJavaOISAccess() { 4.38 + if (javaOISAccess == null) 4.39 + unsafe.ensureClassInitialized(ObjectInputStream.class); 4.40 + 4.41 + return javaOISAccess; 4.42 + } 4.43 + 4.44 }
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 5.2 +++ b/src/share/classes/sun/misc/JavaOISAccess.java Tue Feb 20 13:00:02 2018 -0800 5.3 @@ -0,0 +1,40 @@ 5.4 +/* 5.5 + * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. 5.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 5.7 + * 5.8 + * This code is free software; you can redistribute it and/or modify it 5.9 + * under the terms of the GNU General Public License version 2 only, as 5.10 + * published by the Free Software Foundation. Oracle designates this 5.11 + * particular file as subject to the "Classpath" exception as provided 5.12 + * by Oracle in the LICENSE file that accompanied this code. 5.13 + * 5.14 + * This code is distributed in the hope that it will be useful, but WITHOUT 5.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 5.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 5.17 + * version 2 for more details (a copy is included in the LICENSE file that 5.18 + * accompanied this code). 5.19 + * 5.20 + * You should have received a copy of the GNU General Public License version 5.21 + * 2 along with this work; if not, write to the Free Software Foundation, 5.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 5.23 + * 5.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 5.25 + * or visit www.oracle.com if you need additional information or have any 5.26 + * questions. 5.27 + */ 5.28 + 5.29 +package sun.misc; 5.30 + 5.31 +import java.io.InvalidClassException; 5.32 +import java.io.ObjectInputStream; 5.33 + 5.34 +/* 5.35 + * Skeleton interface added so com.sun.corba.se.impl.ior.StubIORImpl will compile. 5.36 + * JDK implementation will be used at runtime. 5.37 + */ 5.38 +public interface JavaOISAccess { 5.39 + void setObjectInputFilter(ObjectInputStream stream, ObjectInputFilter filter); 5.40 + ObjectInputFilter getObjectInputFilter(ObjectInputStream stream); 5.41 + void checkArray(ObjectInputStream stream, Class<?> arrayType, int arrayLength) 5.42 + throws InvalidClassException; 5.43 +}
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 6.2 +++ b/src/share/classes/sun/misc/ObjectInputFilter.java Tue Feb 20 13:00:02 2018 -0800 6.3 @@ -0,0 +1,36 @@ 6.4 +/* 6.5 + * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. 6.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 6.7 + * 6.8 + * This code is free software; you can redistribute it and/or modify it 6.9 + * under the terms of the GNU General Public License version 2 only, as 6.10 + * published by the Free Software Foundation. Oracle designates this 6.11 + * particular file as subject to the "Classpath" exception as provided 6.12 + * by Oracle in the LICENSE file that accompanied this code. 6.13 + * 6.14 + * This code is distributed in the hope that it will be useful, but WITHOUT 6.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 6.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 6.17 + * version 2 for more details (a copy is included in the LICENSE file that 6.18 + * accompanied this code). 6.19 + * 6.20 + * You should have received a copy of the GNU General Public License version 6.21 + * 2 along with this work; if not, write to the Free Software Foundation, 6.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 6.23 + * 6.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 6.25 + * or visit www.oracle.com if you need additional information or have any 6.26 + * questions. 6.27 + */ 6.28 + 6.29 +package sun.misc; 6.30 + 6.31 +import java.io.InvalidClassException; 6.32 +import java.io.ObjectInputStream; 6.33 + 6.34 +/* 6.35 + * Skeleton interface added so com.sun.corba.se.impl.ior.StubIORImpl will compile. 6.36 + * JDK implementation will be used at runtime. 6.37 + */ 6.38 +public interface ObjectInputFilter { 6.39 +}