MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / CheckList

Method CheckList

Bcore/src/main/cpp/dex/dex_file_verifier.cc:308–323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

306}
307
308bool 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
325bool DexFileVerifier::CheckIndex(uint32_t field, uint32_t limit, const char* label) {
326 if (UNLIKELY(field >= limit)) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected