8181597: Process Proxy presentation
authorrriggs
Mon, 19 Jun 2017 17:38:33 -0400
changeset 47415 354a527f3246
parent 47414 3448b80444f3
child 47416 a627f88bed3a
8181597: Process Proxy presentation Reviewed-by: dfuchs, ahgross, rhalade, skoivu
src/java.base/share/classes/java/io/ObjectInputStream.java
--- a/src/java.base/share/classes/java/io/ObjectInputStream.java	Thu Jun 15 09:57:15 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();