Snap for 8035399 from ea0eb1758fbbb365b93b1e446c8692d16bb1fc88 to tm-release

Change-Id: I5feb31b872c15125879d8c226f6be0fd3918b969
diff --git a/otautil/verifier.cpp b/otautil/verifier.cpp
index 92b9faf..8a65566 100644
--- a/otautil/verifier.cpp
+++ b/otautil/verifier.cpp
@@ -257,8 +257,8 @@
 
   // Check to make sure at least one of the keys matches the signature. Since any key can match,
   // we need to try each before determining a verification failure has happened.
-  size_t i = 0;
-  for (const auto& key : keys) {
+  for (size_t i = 0; i < keys.size(); i++) {
+    const auto& key = keys[i];
     const uint8_t* hash;
     int hash_nid;
     switch (key.hash_len) {
@@ -296,7 +296,6 @@
     } else {
       LOG(INFO) << "Unknown key type " << key.key_type;
     }
-    i++;
   }
 
   if (need_sha1) {