From 7c40d7bc9e89329535fcb566ccd708531d8ea41b Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Mon, 23 Apr 2018 14:10:59 -0700 Subject: [PATCH] AOSP: libext2fs: Track the libsparse API change. libsparse is updating the 'len' parameter, from 'int' to 'size_t', in the callback parameter of sparse_file_foreach_chunk(). The value represents the chunk size, which could be legitimately larger than INT_MAX. Signed-off-by: Theodore Ts'o Google-Bug-Id: 78432315 Test: `m dist` with aosp_marlin-userdebug Change-Id: I35f8a528aff461ce4d3b492a7ca2d4a23592be54 From AOSP commit: 019bed178935585d28cf702a8090a5598415312b --- lib/ext2fs/sparse_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ext2fs/sparse_io.c b/lib/ext2fs/sparse_io.c index 1b39b2e..d0828a8 100644 --- a/lib/ext2fs/sparse_io.c +++ b/lib/ext2fs/sparse_io.c @@ -67,7 +67,7 @@ static void free_sparse_blocks(struct sparse_map *sm) sm->blocks = NULL; } -static int sparse_import_segment(void *priv, const void *data, int len, +static int sparse_import_segment(void *priv, const void *data, size_t len, unsigned int block, unsigned int nr_blocks) { struct sparse_map *sm = priv; -- 1.8.3.1