diff options
| author | Colin Cross <ccross@android.com> | 2012-07-23 17:48:05 -0700 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2012-07-23 17:48:05 -0700 |
| commit | 34fd8596463832c1ce670f436b31ed851552c8f4 (patch) | |
| tree | f904721f4fb237f663316eb56438ed416ee99801 | |
| parent | d47255175ede1af31aee9132914e5d14549ba577 (diff) | |
| parent | f58f62eb31afb59a74566f60683cbbd1099e3111 (diff) | |
| download | system_core-34fd8596463832c1ce670f436b31ed851552c8f4.tar.gz system_core-34fd8596463832c1ce670f436b31ed851552c8f4.tar.bz2 system_core-34fd8596463832c1ce670f436b31ed851552c8f4.zip | |
am f58f62eb: Merge "libsparse: fix 32 bit overflow when calculating last chunk"
* commit 'f58f62eb31afb59a74566f60683cbbd1099e3111':
libsparse: fix 32 bit overflow when calculating last chunk
| -rw-r--r-- | libsparse/sparse.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libsparse/sparse.c b/libsparse/sparse.c index 189b4c03..741e8c6f 100644 --- a/libsparse/sparse.c +++ b/libsparse/sparse.c @@ -139,7 +139,7 @@ static int write_all_blocks(struct sparse_file *s, struct output_file *out) DIV_ROUND_UP(backed_block_len(bb), s->block_size); } - pad = s->len - last_block * s->block_size; + pad = s->len - (int64_t)last_block * s->block_size; assert(pad >= 0); if (pad > 0) { write_skip_chunk(out, pad); |
