view patches/security/20111018/7077466.patch @ 2356:28de6deb3971

Add remaining security patches. 2011-10-14 Andrew John Hughes <ahughes@redhat.com> * Makefile.am: Add additional patches. * NEWS: List JAXWS fix. * patches/icedtea-xjc.patch: Update against 7046794. * patches/security/20111018/7046794.patch, * patches/security/20111018/7077466.patch: Additional security patches.
author Andrew John Hughes <ahughes@redhat.com>
date Fri, 14 Oct 2011 11:37:14 +0100
parents
children
line wrap: on
line source

# HG changeset patch
# User coffeys
# Date 1316425951 -3600
# Node ID 92ab8bb7ff22127aa61442019bd53f3eb19166d3
# Parent  ce3948d7981089ddc960d1191b3fa8ff32ccf165
7077466: fix for RMI DGC
Reviewed-by: smarks

diff --git a/src/share/classes/sun/rmi/server/UnicastServerRef.java b/src/share/classes/sun/rmi/server/UnicastServerRef.java
--- openjdk/jdk/src/share/classes/sun/rmi/server/UnicastServerRef.java
+++ openjdk/jdk/src/share/classes/sun/rmi/server/UnicastServerRef.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -390,6 +390,12 @@ public class UnicastServerRef extends Un
             ObjectInput in;
             try {
                 in = call.getInputStream();
+                try {
+                    Class<?> clazz = Class.forName("sun.rmi.transport.DGCImpl_Skel");
+                    if (clazz.isAssignableFrom(skel.getClass())) {
+                        ((MarshalInputStream)in).useCodebaseOnly();
+                    }
+                } catch (ClassNotFoundException ignore) { }
                 hash = in.readLong();
             } catch (Exception readEx) {
                 throw new UnmarshalException("error unmarshalling call header",