From 88d8001e752573d8b87f7b0cbc784a18622abddd Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Wed, 22 May 2019 18:52:29 -0700 Subject: Move off the Next ZipString overload. Bug: http://b/129068177 Test: treehugger Change-Id: I3c8f70b0d8cc5dc6b3b4439dbe0b9a5bd85003c4 --- install/verifier.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'install/verifier.cpp') diff --git a/install/verifier.cpp b/install/verifier.cpp index 3de58e4bb..02759cdc2 100644 --- a/install/verifier.cpp +++ b/install/verifier.cpp @@ -320,22 +320,21 @@ static std::vector IterateZipEntriesAndSearchForKeys(const ZipArchi std::vector result; - ZipString name; + std::string name; ZipEntry entry; while ((iter_status = Next(cookie, &entry, &name)) == 0) { std::vector pem_content(entry.uncompressed_length); if (int32_t extract_status = ExtractToMemory(handle, &entry, pem_content.data(), pem_content.size()); extract_status != 0) { - LOG(ERROR) << "Failed to extract " << std::string(name.name, name.name + name.name_length); + LOG(ERROR) << "Failed to extract " << name; return {}; } Certificate cert(0, Certificate::KEY_TYPE_RSA, nullptr, nullptr); // Aborts the parsing if we fail to load one of the key file. if (!LoadCertificateFromBuffer(pem_content, &cert)) { - LOG(ERROR) << "Failed to load keys from " - << std::string(name.name, name.name + name.name_length); + LOG(ERROR) << "Failed to load keys from " << name; return {}; } -- cgit v1.2.3