diff options
author | Logan Chien <tzuhsiang.chien@gmail.com> | 2015-04-19 23:27:52 +0800 |
---|---|---|
committer | Andreas Gampe <agampe@google.com> | 2015-04-24 20:42:52 -0700 |
commit | dd3208d3b2f4b78678a341f38a5cc7761c7fca91 (patch) | |
tree | 5657ce4afd75cff76c472b23b684a89ef1e141b5 /runtime/dex_file_verifier.cc | |
parent | 940c65d6757130d2e9f864d4c2220838f0312bea (diff) | |
download | art-dd3208d3b2f4b78678a341f38a5cc7761c7fca91.zip art-dd3208d3b2f4b78678a341f38a5cc7761c7fca91.tar.gz art-dd3208d3b2f4b78678a341f38a5cc7761c7fca91.tar.bz2 |
ART: Fix DBG_START_LOCAL verification.
The third ULEB128 of DBG_START_LOCAL and DBG_START_LOCAL_EXTENDED
entries should be interpreted as type_idx instead.
see also. dalvik/dx/src/com/android/dx/dex/file/DebugInfoEncoder.java
Change-Id: Ic0d52ed20cc2614acb9fa54b61095d1bd64f73fe
Diffstat (limited to 'runtime/dex_file_verifier.cc')
-rw-r--r-- | runtime/dex_file_verifier.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/dex_file_verifier.cc b/runtime/dex_file_verifier.cc index 2603975..a66c38e 100644 --- a/runtime/dex_file_verifier.cc +++ b/runtime/dex_file_verifier.cc @@ -944,7 +944,7 @@ bool DexFileVerifier::CheckIntraDebugInfoItem() { uint32_t type_idx = DecodeUnsignedLeb128(&ptr_); if (type_idx != 0) { type_idx--; - if (!CheckIndex(type_idx, header_->string_ids_size_, "DBG_START_LOCAL type_idx")) { + if (!CheckIndex(type_idx, header_->type_ids_size_, "DBG_START_LOCAL type_idx")) { return false; } } @@ -975,7 +975,7 @@ bool DexFileVerifier::CheckIntraDebugInfoItem() { uint32_t type_idx = DecodeUnsignedLeb128(&ptr_); if (type_idx != 0) { type_idx--; - if (!CheckIndex(type_idx, header_->string_ids_size_, "DBG_START_LOCAL_EXTENDED type_idx")) { + if (!CheckIndex(type_idx, header_->type_ids_size_, "DBG_START_LOCAL_EXTENDED type_idx")) { return false; } } |