+37
−14
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
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