7201070: Serialization to conform to protocol
Reviewed-by: dmocek, ahgross, skoivu
This commit is contained in:
parent
90f2168fa2
commit
39edc8d2b5
@ -1752,6 +1752,12 @@ public class ObjectInputStream
|
||||
ObjectStreamClass desc = readClassDesc(false);
|
||||
desc.checkDeserialize();
|
||||
|
||||
Class<?> cl = desc.forClass();
|
||||
if (cl == String.class || cl == Class.class
|
||||
|| cl == ObjectStreamClass.class) {
|
||||
throw new InvalidClassException("invalid class descriptor");
|
||||
}
|
||||
|
||||
Object obj;
|
||||
try {
|
||||
obj = desc.isInstantiable() ? desc.newInstance() : null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user