java-1_8_0-openjdk/8205491.patch

18 lines
974 B
Diff

--- icedtea-3.8.0/openjdk/jdk/src/share/classes/java/io/ObjectStreamClass.java 2018-09-18 10:38:32.628237194 +0200
+++ icedtea-3.8.0/openjdk/jdk/src/share/classes/java/io/ObjectStreamClass.java 2018-09-18 10:39:56.996684522 +0200
@@ -1534,11 +1534,11 @@
}
return false;
} else {
- // accessible if the parent is public and any constructor
- // is protected or public
- if ((superCl.getModifiers() & Modifier.PUBLIC) == 0) {
+ // sanity check to ensure the parent is protected or public
+ if ((superCl.getModifiers() & (Modifier.PROTECTED | Modifier.PUBLIC)) == 0) {
return false;
}
+ // accessible if any constructor is protected or public
for (Constructor<?> ctor : superCl.getDeclaredConstructors()) {
if ((ctor.getModifiers() & (Modifier.PROTECTED | Modifier.PUBLIC)) != 0) {
return true;