changeset 17388:88f666ee4523

8181597: Process Proxy presentation Reviewed-by: dfuchs, ahgross, rhalade, skoivu
author rriggs
date Mon, 19 Jun 2017 17:38:33 -0400
parents c7107fc8482d
children 851ad3507030
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	Mon Jun 19 11:29:42 2017 -0700
+++ b/src/java.base/share/classes/java/io/ObjectInputStream.java	Mon Jun 19 17:38:33 2017 -0400
@@ -1765,6 +1765,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();