This is the mail archive of the java-patches@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

verify array names



Previously _Jv_VerifyClassName would fail if given the name of an
array.  This patch, which I have committed, corrects the problem.  gij
now appears to be able to run mauve.

1999-08-08  Anthony Green  <green@cygnus.com>

	* defineclass.cc (_Jv_VerifyClassName): Verify array names
	correctly.

Index: libjava/defineclass.cc
===================================================================
RCS file: /cvs/java/libgcj/libjava/defineclass.cc,v
retrieving revision 1.1
diff -u -r1.1 defineclass.cc
--- defineclass.cc      1999/08/08 14:06:20     1.1
+++ defineclass.cc      1999/08/09 00:16:29
@@ -1414,6 +1414,14 @@
   unsigned char *limit = ptr+length;
   int ch;
 
+  if ('[' == UTF8_PEEK (ptr, limit))
+    {
+      if (! _Jv_VerifyOne (++ptr, limit, false))
+        throw_class_format_error ("erroneous class name");
+      else
+        return;
+    }
+
  next_level:
   do {
     if ((ch = UTF8_GET (ptr, limit))==-1)

AG

-- 
Anthony Green                                               Cygnus Solutions
                                                       Sunnyvale, California

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]