prims.cc (_Jv_FindClassFromSignature): Check return of recursive call.
authorJeff Sturm <jsturm@one-point.com>
Fri, 23 Mar 2001 19:17:22 +0000 (19:17 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Fri, 23 Mar 2001 19:17:22 +0000 (19:17 +0000)
2000-03-23  Jeff Sturm  <jsturm@one-point.com>

* prims.cc (_Jv_FindClassFromSignature): Check return of
recursive call.  Do not abort on invalid signature; return NULL
instead.

From-SVN: r40787

libjava/ChangeLog
libjava/prims.cc

index a58e14b51604e4aa43b6c84b92ef553d125a7fed..5c24dd98221f2f1121c4062f13f2694b35b93aff 100644 (file)
@@ -1,3 +1,9 @@
+2000-03-23  Jeff Sturm  <jsturm@one-point.com>
+
+       * prims.cc (_Jv_FindClassFromSignature): Check return of
+       recursive call.  Do not abort on invalid signature; return NULL
+       instead.
+
 2001-03-22  Tom Tromey  <tromey@redhat.com>
 
        * jni.cc (_Jv_JNI_GetAnyFieldID): Handle unresolved fields.
index f68b2f049baebc514288087c21b4030810df65f8..6cd9b0572f00fb64b39f470e2205dc02154cad84 100644 (file)
@@ -559,10 +559,14 @@ _Jv_FindClassFromSignature (char *sig, java::lang::ClassLoader *loader)
 
       }
     case '[':
-      return _Jv_GetArrayClass (_Jv_FindClassFromSignature (&sig[1], loader),
-                               loader);
+      {
+       jclass klass = _Jv_FindClassFromSignature (&sig[1], loader);
+       if (! klass)
+         return NULL;
+       return _Jv_GetArrayClass (klass, loader);
+      }
     }
-  JvFail ("couldn't understand class signature");
+
   return NULL;                 // Placate compiler.
 }