| 737 | } |
| 738 | |
| 739 | bool DexFileVerifier::CheckPadding(size_t offset, |
| 740 | uint32_t aligned_offset, |
| 741 | DexFile::MapItemType type) { |
| 742 | if (offset < aligned_offset) { |
| 743 | if (!CheckListSize(begin_ + offset, aligned_offset - offset, sizeof(uint8_t), "section")) { |
| 744 | return false; |
| 745 | } |
| 746 | while (offset < aligned_offset) { |
| 747 | if (UNLIKELY(*ptr_ != '\0')) { |
| 748 | ErrorStringPrintf("Non-zero padding %x before section of type %zu at offset 0x%zx", |
| 749 | *ptr_, |
| 750 | static_cast<size_t>(type), |
| 751 | offset); |
| 752 | return false; |
| 753 | } |
| 754 | ptr_++; |
| 755 | offset++; |
| 756 | } |
| 757 | } |
| 758 | return true; |
| 759 | } |
| 760 | |
| 761 | bool DexFileVerifier::CheckEncodedValue() { |
| 762 | if (!CheckListSize(ptr_, 1, sizeof(uint8_t), "encoded_value header")) { |
nothing calls this directly
no outgoing calls
no test coverage detected