Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 454c6ab8 authored by Yifan Hong's avatar Yifan Hong Committed by android-build-merger
Browse files

Merge "liblp: SparseBuilder: num_blocks aren't check correctly" am: af4a0e84 am: a6f70fb0

am: 7b8d3e8d

Change-Id: I60040137fb49c16bd9c9b66b30c7264e139e4ddc
parents 85084708 7b8d3e8d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -120,7 +120,7 @@ SparseBuilder::SparseBuilder(const LpMetadata& metadata, uint32_t block_size,
        return;
    }

    uint64_t num_blocks = total_size % block_size;
    uint64_t num_blocks = total_size / block_size;
    if (num_blocks >= UINT_MAX) {
        // libsparse counts blocks in unsigned 32-bit integers, so we check to
        // make sure we're not going to overflow.