summaryrefslogtreecommitdiff
path: root/trusty/coverage/coverage_test.cpp
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2019-12-19 16:10:53 -0800
committerChristopher Ferris <cferris@google.com>2019-12-19 16:48:15 -0800
commit8726d3a448635d571bd1170b2a6f8fdf5e6b5c2b (patch)
treee7e9afae08fb0debe7ffc567693d505f31320c98 /trusty/coverage/coverage_test.cpp
parenta23ce83a3b388d0d91229e4dca943d7ccb01f635 (diff)
Fix handling of possible bad gnu_debugdata_size.
Rather than use a std::vector for backing memory, allocate the memory using a new with nothrow, and in MemoryBuffer use realloc. Since the size field is coming from the elf, it could be corrupted or intentionally crafted to cause problems. In addition, add some other protections to make sure that overflows don't occur. Bug: 146215949 Test: Ran unit tests with jemalloc and scudo to verify that they Test: both behave the same way. Change-Id: If14243ce382ba5403a6bacd0ec673452c6b7c3be
Diffstat (limited to 'trusty/coverage/coverage_test.cpp')
0 files changed, 0 insertions, 0 deletions