libhevcdec: Fix heap buffer overflow in ihevcd_get_tu_data_size ihevcd_get_tu_data_size() previously budgeted the tu_map using only luma TUs (num_luma_tu), while the initialization logic consumes space for both luma and chroma. This change updates the allocation to use num_tu to properly size the buffer Bug: 505000651 Test: poc in the bug Cherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:ffc26dcdf3206e23b11e0820066a6c83732adc25 Cherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:ab676b9cfe96e396e8f77ee255ffb13da4d0d466 Merged-In: I8ff89026f66addf34b18dbedf9001db292db8fe9 Change-Id: I8ff89026f66addf34b18dbedf9001db292db8fe9
Supports:
Use the following commands for building on the target machine
$ cd external/libhevc $ mkdir build $ cd build $ cmake .. $ make
$ cd external/libhevc $ mkdir build $ cd build $ CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32" cmake .. $ make
Update ‘CMAKE_C_COMPILER’, ‘CMAKE_CXX_COMPILER’, ‘CMAKE_C_COMPILER_AR’, and ‘CMAKE_CXX_COMPILER_AR’ in CMAKE_TOOLCHAIN_FILE passed below
$ cd external/libhevc $ mkdir build $ cd build
$ cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch64_toolchain.cmake $ make
$ cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch32_toolchain.cmake $ make