Merge change 1690 into donut

* changes:
  Rework some code so that it works the way it was supposed to work.
This commit is contained in:
Android (Google) Code Review
2009-05-14 15:32:42 -07:00

View File

@@ -236,8 +236,9 @@ class CertificateValidatorCache {
} }
} }
if (secureHash != null) {
int hashLength = secureHash.length; int hashLength = secureHash.length;
if (secureHash != null && 0 < hashLength) { if (0 < hashLength) {
if (hashLength == mHash.length) { if (hashLength == mHash.length) {
for (int i = 0; i < hashLength; ++i) { for (int i = 0; i < hashLength; ++i) {
if (secureHash[i] != mHash[i]) { if (secureHash[i] != mHash[i]) {
@@ -247,6 +248,7 @@ class CertificateValidatorCache {
return true; return true;
} }
} }
}
return false; return false;
} }