changeset 17307:68f7ee7fa950

8181597: Process Proxy presentation Reviewed-by: dfuchs, ahgross, rhalade, skoivu
author rriggs
date Mon, 19 Jun 2017 17:38:33 -0400
parents 00b23d346f47
children f5b788cee74c
files src/java.base/share/classes/java/io/ObjectInputStream.java
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/io/ObjectInputStream.java	Tue Jul 18 11:30:16 2017 -0700
+++ b/src/java.base/share/classes/java/io/ObjectInputStream.java	Mon Jun 19 17:38:33 2017 -0400
@@ -1770,6 +1770,10 @@
         passHandle = NULL_HANDLE;
 
         int numIfaces = bin.readInt();
+        if (numIfaces > 65535) {
+            throw new InvalidObjectException("interface limit exceeded: "
+                    + numIfaces);
+        }
         String[] ifaces = new String[numIfaces];
         for (int i = 0; i < numIfaces; i++) {
             ifaces[i] = bin.readUTF();