Check that the header's section's size are consistent Check that the whole section (i.e. offset + size) lies within the file. Otherwise, we risk reading past the end of the file e.g. in https://cs.android.com/android/platform/superproject/+/master:art/libdexfile/dex/dex_file_verifier.cc;l=1427;drc=9f5fd34fe52e7bdc7fe2d919c34d366bf5393654. Bug: 286840166 Fixes: 286840166 Test: SANITIZE_HOST='address' m \ test-art-host-gtest-art_libdexfile_tests64 Change-Id: I84351f97e76ffee4d764fce47c1966e6e1f73897