Merge "Fix OpenSSL Builds" am: 712784055b

Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/12905382

Change-Id: Ie4bcf32c77bf2963edee97d375fcde28e46f460f
This commit is contained in:
TreeHugger Robot
2020-10-29 01:23:34 +00:00
committed by Automerger Merge Worker
2 changed files with 4 additions and 2 deletions

View File

@@ -336,11 +336,12 @@ bool ExtractExtensionValueFromCertificate(const std::string& cert,
STACK_OF(X509)* certs = pkcs7->d.sign->cert;
// Find the desired certificate from the stack.
if (cert_index >= static_cast<size_t>(sk_X509_num(certs))) {
const size_t num_certs = static_cast<size_t>(sk_X509_num(certs));
if (cert_index >= num_certs) {
LOGE(
"Unexpected number of certificates in chain: "
"count = %zu, minimum = %zu",
sk_X509_num(certs), cert_index + 1);
num_certs, cert_index + 1);
return false;
}

View File

@@ -9,6 +9,7 @@
#include <stdint.h>
#include <map>
#include <memory>
#include <string>
#include <vector>