diff options
author | Kenny Root <kroot@google.com> | 2014-11-14 16:40:33 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-11-14 16:40:34 +0000 |
commit | 657afa6cd8da378f30afe7b491e6d9de6c7c23fd (patch) | |
tree | 42eb0ed481d13ca8bdd4662088c94738c4cbf1df /luni | |
parent | 69c194df8d599730a8c5f0f79985cd7b4b2ece96 (diff) | |
parent | ef7f5a16547089a7cdba9e48d780720f606ff54a (diff) | |
download | libcore-657afa6cd8da378f30afe7b491e6d9de6c7c23fd.zip libcore-657afa6cd8da378f30afe7b491e6d9de6c7c23fd.tar.gz libcore-657afa6cd8da378f30afe7b491e6d9de6c7c23fd.tar.bz2 |
Merge "JarUtils: stop trying to build chain past candidates length" into lmp-mr1-dev
Diffstat (limited to 'luni')
-rw-r--r-- | luni/src/main/java/org/apache/harmony/security/utils/JarUtils.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/luni/src/main/java/org/apache/harmony/security/utils/JarUtils.java b/luni/src/main/java/org/apache/harmony/security/utils/JarUtils.java index 5755dc2..917a3a8 100644 --- a/luni/src/main/java/org/apache/harmony/security/utils/JarUtils.java +++ b/luni/src/main/java/org/apache/harmony/security/utils/JarUtils.java @@ -249,6 +249,10 @@ public class JarUtils { } chain.add(issuerCert); count++; + /* Prevent growing infinitely if there is a loop */ + if (count > candidates.length) { + break; + } issuer = issuerCert.getIssuerDN(); if (issuerCert.getSubjectDN().equals(issuer)) { break; |