diff options
author | Christopher Ferris <cferris@google.com> | 2015-10-29 19:20:52 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2015-10-29 19:20:52 +0000 |
commit | 3f5fdc35228b4bf9c86a91a35fc73a06d14391c5 (patch) | |
tree | 7d30eec347a3f7f83f020400fdbee6e7fddb2140 | |
parent | ba1d268273afdb954564fb5d75700cbe93a5dcac (diff) | |
parent | 69406d904abffcfd5addf14dc96584f73ab04ff5 (diff) | |
download | system_core-3f5fdc35228b4bf9c86a91a35fc73a06d14391c5.zip system_core-3f5fdc35228b4bf9c86a91a35fc73a06d14391c5.tar.gz system_core-3f5fdc35228b4bf9c86a91a35fc73a06d14391c5.tar.bz2 |
Fix incorrect check of descsz value. am: d917514bd6
am: 69406d904a
* commit '69406d904abffcfd5addf14dc96584f73ab04ff5':
Fix incorrect check of descsz value.
-rw-r--r-- | debuggerd/elf_utils.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/debuggerd/elf_utils.cpp b/debuggerd/elf_utils.cpp index 5ea03e7..65c1904 100644 --- a/debuggerd/elf_utils.cpp +++ b/debuggerd/elf_utils.cpp @@ -63,10 +63,10 @@ static bool get_build_id( if (nhdr.n_type == NT_GNU_BUILD_ID) { // Skip the name (which is the owner and should be "GNU"). addr += NOTE_ALIGN(nhdr.n_namesz); - uint8_t build_id_data[128]; - if (nhdr.n_namesz > sizeof(build_id_data)) { - ALOGE("Possible corrupted note, name size value is too large: %u", - nhdr.n_namesz); + uint8_t build_id_data[160]; + if (nhdr.n_descsz > sizeof(build_id_data)) { + ALOGE("Possible corrupted note, desc size value is too large: %u", + nhdr.n_descsz); return false; } if (backtrace->Read(addr, build_id_data, nhdr.n_descsz) != nhdr.n_descsz) { |