| 306 | } |
| 307 | |
| 308 | bool DexFileVerifier::CheckList(size_t element_size, const char* label, const uint8_t* *ptr) { |
| 309 | // Check that the list is available. The first 4B are the count. |
| 310 | if (!CheckListSize(*ptr, 1, 4U, label)) { |
| 311 | return false; |
| 312 | } |
| 313 | |
| 314 | uint32_t count = *reinterpret_cast<const uint32_t*>(*ptr); |
| 315 | if (count > 0) { |
| 316 | if (!CheckListSize(*ptr + 4, count, element_size, label)) { |
| 317 | return false; |
| 318 | } |
| 319 | } |
| 320 | |
| 321 | *ptr += 4 + count * element_size; |
| 322 | return true; |
| 323 | } |
| 324 | |
| 325 | bool DexFileVerifier::CheckIndex(uint32_t field, uint32_t limit, const char* label) { |
| 326 | if (UNLIKELY(field >= limit)) { |
nothing calls this directly
no outgoing calls
no test coverage detected