aboutsummaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authorJeff Sturm <jsturm@one-point.com>2001-03-23 19:17:22 +0000
committerTom Tromey <tromey@gcc.gnu.org>2001-03-23 19:17:22 +0000
commitb64295c4d34897ecdc398d7cacbb8f292530713f (patch)
tree52e8fc029d0fc50bc88eadfb097bbbc2ea437d19 /libjava
parent83c64db681317c28239f07c5a8e6bb201834f0ba (diff)
downloadgcc-b64295c4d34897ecdc398d7cacbb8f292530713f.zip
gcc-b64295c4d34897ecdc398d7cacbb8f292530713f.tar.gz
gcc-b64295c4d34897ecdc398d7cacbb8f292530713f.tar.bz2
prims.cc (_Jv_FindClassFromSignature): Check return of recursive call.
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
Diffstat (limited to 'libjava')
-rw-r--r--libjava/ChangeLog6
-rw-r--r--libjava/prims.cc10
2 files changed, 13 insertions, 3 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index a58e14b..5c24dd9 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -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.
diff --git a/libjava/prims.cc b/libjava/prims.cc
index f68b2f0..6cd9b05 100644
--- a/libjava/prims.cc
+++ b/libjava/prims.cc
@@ -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.
}