Return-Path: Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: (qmail 2735 invoked from network); 16 Dec 2009 08:18:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 16 Dec 2009 08:18:12 -0000 Received: (qmail 89386 invoked by uid 500); 16 Dec 2009 08:18:12 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 89305 invoked by uid 500); 16 Dec 2009 08:18:11 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 89296 invoked by uid 99); 16 Dec 2009 08:18:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Dec 2009 08:18:11 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Dec 2009 08:18:10 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 6595F2388A18; Wed, 16 Dec 2009 08:17:49 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r891151 - /commons/sandbox/runtime/trunk/src/main/native/shared/clazz.c Date: Wed, 16 Dec 2009 08:17:49 -0000 To: commits@commons.apache.org From: mturk@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20091216081749.6595F2388A18@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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; }