c5da03f448
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 |
||
---|---|---|
.. | ||
include/ziparchive | ||
testdata | ||
.clang-format | ||
Android.bp | ||
entry_name_utils-inl.h | ||
entry_name_utils_test.cc | ||
OWNERS | ||
unzip.cpp | ||
zip_archive.cc | ||
zip_archive_benchmark.cpp | ||
zip_archive_common.h | ||
zip_archive_private.h | ||
zip_archive_stream_entry.cc | ||
zip_archive_test.cc | ||
zip_writer.cc | ||
zip_writer_test.cc |