Whamcloud - gitweb
AOSP: libext2fs: Track the libsparse API change.
authorTao Bao <tbao@google.com>
Mon, 23 Apr 2018 21:10:59 +0000 (14:10 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 21 Jun 2018 13:59:38 +0000 (09:59 -0400)
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 <tytso@mit.edu>
Google-Bug-Id: 78432315
Test: `m dist` with aosp_marlin-userdebug
Change-Id: I35f8a528aff461ce4d3b492a7ca2d4a23592be54
From AOSP commit: 019bed178935585d28cf702a8090a5598415312b

lib/ext2fs/sparse_io.c

index 1b39b2e..d0828a8 100644 (file)
@@ -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;