| 1840 | } |
| 1841 | |
| 1842 | bool DexFileVerifier::CheckIntraDataSection(size_t offset, |
| 1843 | uint32_t count, |
| 1844 | DexFile::MapItemType type) { |
| 1845 | size_t data_start = header_->data_off_; |
| 1846 | size_t data_end = data_start + header_->data_size_; |
| 1847 | |
| 1848 | // Sanity check the offset of the section. |
| 1849 | if (UNLIKELY((offset < data_start) || (offset > data_end))) { |
| 1850 | ErrorStringPrintf("Bad offset for data subsection: %zx", offset); |
| 1851 | return false; |
| 1852 | } |
| 1853 | |
| 1854 | if (!CheckIntraSectionIterate(offset, count, type)) { |
| 1855 | return false; |
| 1856 | } |
| 1857 | |
| 1858 | size_t next_offset = ptr_ - begin_; |
| 1859 | if (next_offset > data_end) { |
| 1860 | ErrorStringPrintf("Out-of-bounds end of data subsection: %zu data_off=%u data_size=%u", |
| 1861 | next_offset, |
| 1862 | header_->data_off_, |
| 1863 | header_->data_size_); |
| 1864 | return false; |
| 1865 | } |
| 1866 | |
| 1867 | return true; |
| 1868 | } |
| 1869 | |
| 1870 | bool DexFileVerifier::CheckIntraSection() { |
| 1871 | const DexFile::MapList* map = reinterpret_cast<const DexFile::MapList*>(begin_ + header_->map_off_); |
nothing calls this directly
no outgoing calls
no test coverage detected