summaryrefslogtreecommitdiff
path: root/libjava/classpath/java/io/ObjectOutputStream.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/classpath/java/io/ObjectOutputStream.java')
-rw-r--r--libjava/classpath/java/io/ObjectOutputStream.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/libjava/classpath/java/io/ObjectOutputStream.java b/libjava/classpath/java/io/ObjectOutputStream.java
index 573b9cfa1de..961d5e3099f 100644
--- a/libjava/classpath/java/io/ObjectOutputStream.java
+++ b/libjava/classpath/java/io/ObjectOutputStream.java
@@ -442,6 +442,11 @@ public class ObjectOutputStream extends OutputStream
realOutput.writeByte(flags);
ObjectStreamField[] fields = osc.fields;
+
+ if (fields == ObjectStreamClass.INVALID_FIELDS)
+ throw new InvalidClassException
+ (osc.getName(), "serialPersistentFields is invalid");
+
realOutput.writeShort(fields.length);
ObjectStreamField field;