platform_system_core/libziparchive
Nick Kralevich c5da03f448 entry_name_utils-inl.h: clear top bit before shifting
Attempting to shift a uint8_t which has the top bit set results in a
value outside of the range allowable for a uint8_t. The process of
converting this value back to a uint8_t triggers ubsan's
implicit-conversion sanitizer.

Ensure the high order bit is stripped before shifting, so that the
shifted value fits into the allowable uint8_t range.

This change is necessary to enable integer sanitization on this code.

Somewhat related to Bug: 122975762
Test: atest ziparchive-tests

Change-Id: I940c8b2828ac88348d80f731274b990e35de6631
2019-03-21 09:29:31 -07:00
..
include/ziparchive More Mac build fixes. 2018-10-26 10:53:24 -07:00
testdata Check filename memory bound when parsing ziparchive 2017-06-30 17:19:28 +09:00
.clang-format add a performance benchmark for libziparchive 2017-05-30 10:50:14 -07:00
Android.bp Revert the explicit config, see topic 2019-02-20 13:29:11 -08:00
entry_name_utils-inl.h entry_name_utils-inl.h: clear top bit before shifting 2019-03-21 09:29:31 -07:00
entry_name_utils_test.cc Ran clang-format on libziparchive sources and headers 2017-07-02 11:46:53 +09:00
OWNERS Add OWNERS. 2017-12-07 13:30:03 -08:00
unzip.cpp Add libziparchive-based unzip. 2017-06-04 11:53:48 -07:00
zip_archive.cc zip_archive.cc: add O_CLOEXEC 2018-12-18 12:48:06 -08:00
zip_archive_benchmark.cpp BENCHMARK_MAIN now requires a semicolon. 2017-12-13 18:19:18 -08:00
zip_archive_common.h Ran clang-format on libziparchive sources and headers 2017-07-02 11:46:53 +09:00
zip_archive_private.h Add a simple MappedFile to libbase and switch fastboot and libziparchive over. 2018-10-23 13:20:49 -07:00
zip_archive_stream_entry.cc libziparchive: Use ReadAtOffset exclusively 2017-07-25 18:12:12 +00:00
zip_archive_test.cc Fix double closes in ziparchive tests. 2018-11-16 19:54:41 +00:00
zip_writer.cc Add a simple MappedFile to libbase and switch fastboot and libziparchive over. 2018-10-23 13:20:49 -07:00
zip_writer_test.cc Ran clang-format on libziparchive sources and headers 2017-07-02 11:46:53 +09:00