Hi,

Class.getClasses() was not performing the member access checks like it
ought.  The attached patch fixes.  I'm working on mauve tests for all
of Class's security calls so there will be a check for this issue
soonish.

Cheers,
Gary
Index: ChangeLog
===================================================================
RCS file: /cvsroot/classpath/classpath/ChangeLog,v
retrieving revision 1.5768
diff -u -r1.5768 ChangeLog
--- ChangeLog   6 Dec 2005 16:30:02 -0000       1.5768
+++ ChangeLog   6 Dec 2005 17:31:24 -0000
@@ -1,3 +1,8 @@
+2005-12-06  Gary Benson  <[EMAIL PROTECTED]>
+
+       * java/lang/Class.java (getDeclaredClasses): Move the call to
+       memberAccessCheck so that it affects getClasses() too.
+
 2005-12-06  Anthony Balkissoon  <[EMAIL PROTECTED]>
 
        * java/awt/BorderLayout.java:
Index: java/lang/Class.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/lang/Class.java,v
retrieving revision 1.41
diff -u -r1.41 Class.java
--- java/lang/Class.java        28 Oct 2005 09:26:48 -0000      1.41
+++ java/lang/Class.java        6 Dec 2005 17:31:24 -0000
@@ -371,12 +371,12 @@
    */
   public Class[] getDeclaredClasses()
   {
-    memberAccessCheck(Member.DECLARED);
     return getDeclaredClasses(false);
   }
 
   Class[] getDeclaredClasses (boolean publicOnly)
   {
+    memberAccessCheck(Member.DECLARED);
     return VMClass.getDeclaredClasses (this, publicOnly);
   }
 
_______________________________________________
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches

Reply via email to