diff options
| author | 2014-05-27 18:39:03 +0000 | |
|---|---|---|
| committer | 2014-05-27 18:39:03 +0000 | |
| commit | e3b5cb502371aff7e7b7291facfc27b092e7803e (patch) | |
| tree | 2ac9381a9bc03778efd9f7328477900125864aa8 | |
| parent | ab5b370e44629332e73ffd66bfe8b8a924236c5c (diff) | |
| parent | c647564845429bd709ed3338c13f15063c2f9fd9 (diff) | |
Merge "Workaround apparent clang compilation issue"
| -rw-r--r-- | runtime/dex_file_verifier.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/runtime/dex_file_verifier.cc b/runtime/dex_file_verifier.cc index a1c8c7169e..17d1ffc128 100644 --- a/runtime/dex_file_verifier.cc +++ b/runtime/dex_file_verifier.cc @@ -698,6 +698,7 @@ bool DexFileVerifier::CheckIntraStringDataItem() { const byte* file_end = begin_ + size_; for (uint32_t i = 0; i < size; i++) { + CHECK_LT(i, size); // b/15014252 Prevents hitting the impossible case below if (UNLIKELY(ptr_ >= file_end)) { ErrorStringPrintf("String data would go beyond end-of-file"); return false; @@ -710,6 +711,7 @@ bool DexFileVerifier::CheckIntraStringDataItem() { case 0x00: // Special case of bit pattern 0xxx. if (UNLIKELY(byte == 0)) { + CHECK_LT(i, size); // b/15014252 Actually hit this impossible case with clang ErrorStringPrintf("String data shorter than indicated utf16_size %x", size); return false; } |