platform_system_core/libsparse
David Anderson f06debcf24 libsparse: Fix allocation failures on 32-bit systems.
libsparse uses mapped files for length computation checks and writing
output data. The platform-tools package for Windows is 32-bit, and if
an embedded file in the stream is large enough, mapping will fail. In
theory, this failure mode could happen on 64-bit systems as well.

As a workaround, map files in chunks of 256MB instead. This is
implemented by adding a new "fd_chunk" callback to the sparse ops
struct.

Bug: 273933042
Bug: 268872725
Test: fastboot update on Windows
Change-Id: Ic40696b34a1d0951787c899db701fc2fa204eb18
2023-03-20 15:55:57 -07:00
..
include/sparse Merge changes from topic "sparse-file-read-enum" 2022-01-28 05:28:04 +00:00
.clang-format libsparse: Add .clang-format and reformat to google3 style 2018-06-13 20:32:24 +00:00
Android.bp Fix module-file name collisions 2022-09-20 12:33:47 -07:00
append2simg.cpp Replace exit codes with EXIT_SUCCESS and EXIT_FAILURE. 2022-11-10 21:24:40 +01:00
backed_block.cpp libsparse: Fix overflow of merged sparse chunk length 2020-08-11 08:34:28 +09:00
backed_block.h libsparse: Fix overflow of merged sparse chunk length 2020-08-11 08:34:28 +09:00
defs.h libsparse: Add .clang-format and reformat to google3 style 2018-06-13 20:32:24 +00:00
img2simg.cpp Replace exit codes with EXIT_SUCCESS and EXIT_FAILURE. 2022-11-10 21:24:40 +01:00
output_file.cpp libsparse: Fix allocation failures on 32-bit systems. 2023-03-20 15:55:57 -07:00
output_file.h libsparse: Fix overflow of merged sparse chunk length 2020-08-11 08:34:28 +09:00
OWNERS libsparse: add OWNERS. 2018-06-13 12:43:08 -07:00
simg2img.cpp Replace exit codes with EXIT_SUCCESS and EXIT_FAILURE. 2022-11-10 21:24:40 +01:00
simg_dump.py simg_dump.py: fix error for CHUNK_TYPE_FILL 2022-10-03 16:27:49 +08:00
sparse.cpp libsparse: Propagate failures when resparsing files. 2023-03-16 21:50:03 -07:00
sparse_crc32.cpp libsparse: Add .clang-format and reformat to google3 style 2018-06-13 20:32:24 +00:00
sparse_crc32.h libsparse: Add .clang-format and reformat to google3 style 2018-06-13 20:32:24 +00:00
sparse_defs.h libsparse: Add .clang-format and reformat to google3 style 2018-06-13 20:32:24 +00:00
sparse_err.cpp libsparse: Add .clang-format and reformat to google3 style 2018-06-13 20:32:24 +00:00
sparse_file.h libsparse: Add .clang-format and reformat to google3 style 2018-06-13 20:32:24 +00:00
sparse_format.h libsparse: Add .clang-format and reformat to google3 style 2018-06-13 20:32:24 +00:00
sparse_fuzzer.cpp sparse_fuzzer: Bug fix 2022-04-04 14:03:55 +05:30
sparse_read.cpp libsparse: Don't spam errors in sparse_file_import_auto. 2022-06-01 18:36:04 -07:00