commit | 8913aaf69741d44462b90dce07e4d816f8e1a29d | [log] [tgz] |
---|---|---|
author | Tao Bao <tbao@google.com> | Tue Apr 24 10:54:21 2018 -0700 |
committer | Tao Bao <tbao@google.com> | Tue Apr 24 18:10:42 2018 -0700 |
tree | 0eb3a9bc91e7fae881af8c662832f53ac95df472 | |
parent | 64a6fd9ffc59989708c5e2f08c106e6f02619c5f [diff] |
fastboot: sparse_file_len() returns int64_t. Check that the value fits in uint32_t that's supported by the current protocol. Also fix and sanity check the max_size before passing it to sparse_file_resparse(), which accepts `unsigned int`. This shouldn't happen in practice because of RESPARSE_LIMIT (1 GiB). Test: `fastboot flash` with small and large images. Change-Id: I0a8279fc14c54c40a70ddce65c3b25173c0d0a40