You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2009/12/16 09:17:49 UTC
svn commit: r891151 -
/commons/sandbox/runtime/trunk/src/main/native/shared/clazz.c
Author: mturk
Date: Wed Dec 16 08:17:48 2009
New Revision: 891151
URL: http://svn.apache.org/viewvc?rev=891151&view=rev
Log:
This can crash the JVM if class wasn't inited
Modified:
commons/sandbox/runtime/trunk/src/main/native/shared/clazz.c
Modified: commons/sandbox/runtime/trunk/src/main/native/shared/clazz.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/shared/clazz.c?rev=891151&r1=891150&r2=891151&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/shared/clazz.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/shared/clazz.c Wed Dec 16 08:17:48 2009
@@ -303,8 +303,9 @@
acr_cclass_e clazz,
jsize len)
{
- if (clazz >= 0 && clazz < ACR_CC_MAX)
- return (*_E)->NewObjectArray(_E, len, core_classes[clazz].clazz, NULL);
+ jclass cc = ACR_GetCoreClass(clazz);
+ if (cc)
+ return (*_E)->NewObjectArray(_E, len, cc, NULL);
else
return NULL;
}