summaryrefslogtreecommitdiffstats
path: root/libart/src/main
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2013-07-26 09:22:16 -0700
committerIan Rogers <irogers@google.com>2013-08-08 12:09:29 -0700
commit5608e04d323281a4c7e45eee1a9ca4b23437e0c5 (patch)
tree89a2839ace3e264da96d414997ac68587d48a804 /libart/src/main
parented80d3a1a25d5bd37c25c1cd8ea4c192729c2618 (diff)
downloadlibcore-5608e04d323281a4c7e45eee1a9ca4b23437e0c5.zip
libcore-5608e04d323281a4c7e45eee1a9ca4b23437e0c5.tar.gz
libcore-5608e04d323281a4c7e45eee1a9ca4b23437e0c5.tar.bz2
Fix AIOOBE in Method.compareParameters.
Bug: 10032782 (cherry-picked from commit f700b73e492203ec773fb76d4525394ed3a1cc23) Change-Id: Id46690c1b3b08594cc8ad54f22f601b44d17841e
Diffstat (limited to 'libart/src/main')
-rw-r--r--libart/src/main/java/java/lang/reflect/Method.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/libart/src/main/java/java/lang/reflect/Method.java b/libart/src/main/java/java/lang/reflect/Method.java
index ce3d99e..00b51ad 100644
--- a/libart/src/main/java/java/lang/reflect/Method.java
+++ b/libart/src/main/java/java/lang/reflect/Method.java
@@ -254,7 +254,7 @@ public final class Method extends AbstractMethod implements GenericDeclaration,
Dex dex = getDeclaringClass().getDex();
short[] types = dex.parameterTypeIndicesFromMethodIndex(methodDexIndex);
int length = Math.min(types.length, params.length);
- for (int i = 0; i < types.length; i++) {
+ for (int i = 0; i < length; i++) {
Class<?> aType = getDexCacheType(dex, types[i] & 0xFFFF);
Class<?> bType = params[i];
if (aType != bType) {