commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r891151 - /commons/sandbox/runtime/trunk/src/main/native/shared/clazz.c
Date Wed, 16 Dec 2009 08:17:49 GMT
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;
 }



Mime
View raw message