From: Jeff Sturm Date: Fri, 23 Mar 2001 19:17:22 +0000 (+0000) Subject: prims.cc (_Jv_FindClassFromSignature): Check return of recursive call. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b64295c4d34897ecdc398d7cacbb8f292530713f;p=gcc.git prims.cc (_Jv_FindClassFromSignature): Check return of recursive call. 2000-03-23 Jeff Sturm * prims.cc (_Jv_FindClassFromSignature): Check return of recursive call. Do not abort on invalid signature; return NULL instead. From-SVN: r40787 --- diff --git a/libjava/ChangeLog b/libjava/ChangeLog index a58e14b5160..5c24dd98221 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,9 @@ +2000-03-23 Jeff Sturm + + * prims.cc (_Jv_FindClassFromSignature): Check return of + recursive call. Do not abort on invalid signature; return NULL + instead. + 2001-03-22 Tom Tromey * jni.cc (_Jv_JNI_GetAnyFieldID): Handle unresolved fields. diff --git a/libjava/prims.cc b/libjava/prims.cc index f68b2f049ba..6cd9b0572f0 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. }