commit | e830a51351f4e22e3e88cc226863db05297e6250 | [log] [tgz] |
---|---|---|
author | Tianjie Xu <xunchang@google.com> | Fri Sep 07 15:24:58 2018 -0700 |
committer | Tianjie Xu <xunchang@google.com> | Fri Sep 07 16:09:28 2018 -0700 |
tree | 2932324bc62e6f3dc701ac190cda7aec5e992533 | |
parent | 510b13acd87b3b88975617d166412c4e3248f2d3 [diff] |
DO NOT MERGE: Initialize the ZipArchive to zero before parsing The fields of the ZipArchive on the stack are not initialized before we call libminzip to parse the zip file. As a result, some random memory location is freed unintentionally when we close the ZipArchive upon parsing failures. Bug: 35385357 Test: recompile and run the poc with asan. Change-Id: I7e7f8ab4816c84a158af7389e1a889f8fc65f079
mm -j && m ramdisk-nodeps && m recoveryimage-nodeps # To boot into the new recovery image # without flashing the recovery partition: adb reboot bootloader fastboot boot $ANDROID_PRODUCT_OUT/recovery.img
# After setting up environment and lunch. mmma -j bootable/recovery # Running the tests on device. adb root adb sync data # 32-bit device adb shell /data/nativetest/recovery_unit_test/recovery_unit_test adb shell /data/nativetest/recovery_component_test/recovery_component_test # Or 64-bit device adb shell /data/nativetest64/recovery_unit_test/recovery_unit_test adb shell /data/nativetest64/recovery_component_test/recovery_component_test