android_system_core/libziparchive
Nick Kralevich c0bf36647b zip_archive.cc: Use static cast instead of masking
Although ubsan's implicit-unsigned-integer-truncation sanitizer may be
happy, this code still performs an implicit conversion from a wider
width data structure to a narrower width data structure. Rather than
masking the bits, make the conversion explicit. This keeps ubsan happy
as well as addressing a -Wconversion warning.

This change addresses comments from the post-submit review
of a4e5433660.

Test: compiles and boots.
Bug: 122975762
Change-Id: I1fa6d6f8a6fcfb93ba9916b7d2b3564ca1d8caf3
2019-04-05 09:32:14 -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 libziparchive: add integer checks 2019-03-20 13:04:02 -07: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: Use static cast instead of masking 2019-04-05 09:32:14 -07: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 zip_writer.cc: update powerof2 and use it unconditionally 2019-03-27 10:24:44 -07:00
zip_writer_test.cc Ran clang-format on libziparchive sources and headers 2017-07-02 11:46:53 +09:00