commit | 652ce94f400beb9d64466c294d60d961648f45b4 | [log] [tgz] |
---|---|---|
author | Treehugger Robot <treehugger-gerrit@google.com> | Wed Apr 19 19:14:45 2017 +0000 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Wed Apr 19 19:14:47 2017 +0000 |
tree | 313cf901c122b5baf91fefac166550352b507ce1 | |
parent | 06039e58d804287fcd8f8edb99983865429026ea [diff] | |
parent | 3738968ed8587bb742ce8aed3ec61b3c9663b9d8 [diff] |
Merge "libsparse: Fix odd-sized input files total_blks"
diff --git a/libsparse/output_file.c b/libsparse/output_file.c index 2115998..51e60ef 100644 --- a/libsparse/output_file.c +++ b/libsparse/output_file.c
@@ -584,7 +584,7 @@ .file_hdr_sz = SPARSE_HEADER_LEN, .chunk_hdr_sz = CHUNK_HEADER_LEN, .blk_sz = out->block_size, - .total_blks = out->len / out->block_size, + .total_blks = DIV_ROUND_UP(out->len, out->block_size), .total_chunks = chunks, .image_checksum = 0 };