OSDN Git Service

ART: Fix typo
authorAndreas Gampe <agampe@google.com>
Tue, 2 Sep 2014 17:22:20 +0000 (10:22 -0700)
committerAndreas Gampe <agampe@google.com>
Tue, 2 Sep 2014 17:33:52 +0000 (10:33 -0700)
Bug: 17327877

(cherry picked from commit b373ba1bf7e67d4dd8286df08065ac76aa8ac1ee)

Change-Id: I6132a8afb4b69c8d22a01b477f6f324c789ed666

runtime/dex_file_verifier.cc

index 0782045..d7d541a 100644 (file)
@@ -1046,7 +1046,8 @@ bool DexFileVerifier::CheckIntraAnnotationsDirectoryItem() {
   return true;
 }
 
-bool DexFileVerifier::CheckIntraSectionIterate(size_t offset, uint32_t count, uint16_t type) {
+bool DexFileVerifier::CheckIntraSectionIterate(size_t offset, uint32_t section_count,
+                                               uint16_t type) {
   // Get the right alignment mask for the type of section.
   size_t alignment_mask;
   switch (type) {
@@ -1063,7 +1064,7 @@ bool DexFileVerifier::CheckIntraSectionIterate(size_t offset, uint32_t count, ui
   }
 
   // Iterate through the items in the section.
-  for (uint32_t i = 0; i < count; i++) {
+  for (uint32_t i = 0; i < section_count; i++) {
     size_t aligned_offset = (offset + alignment_mask) & ~alignment_mask;
 
     // Check the padding between items.
@@ -1129,7 +1130,7 @@ bool DexFileVerifier::CheckIntraSectionIterate(size_t offset, uint32_t count, ui
           return false;
         }
 
-        ptr_ += count;
+        ptr_ += list_size;
         break;
       }
       case DexFile::kDexTypeAnnotationSetRefList: {