diff options
author | Ian Rogers <irogers@google.com> | 2013-07-26 09:22:16 -0700 |
---|---|---|
committer | Ian Rogers <irogers@google.com> | 2013-08-08 12:09:29 -0700 |
commit | 5608e04d323281a4c7e45eee1a9ca4b23437e0c5 (patch) | |
tree | 89a2839ace3e264da96d414997ac68587d48a804 /libart/src/main/java | |
parent | ed80d3a1a25d5bd37c25c1cd8ea4c192729c2618 (diff) | |
download | libcore-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/java')
-rw-r--r-- | libart/src/main/java/java/lang/reflect/Method.java | 2 |
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) { |