commit | 2050579b79f495832ec8aa11655a809d87bfc8e3 | [log] [tgz] |
---|---|---|
author | Tianjie Xu <xunchang@google.com> | Fri Sep 07 15:24:58 2018 -0700 |
committer | Tianjie Xu <xunchang@google.com> | Thu Oct 04 21:11:11 2018 +0000 |
tree | bb59b4146400dc069b95d0498c206abef0ddf88b | |
parent | 28b67f8eea62fa1521b988e2c42db87ff001ec26 [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