MA-18166 Android: Fix mmc multi blk load issue
authorJi Luo <ji.luo@nxp.com>
Wed, 28 Oct 2020 01:12:59 +0000 (09:12 +0800)
committerJi Luo <ji.luo@nxp.com>
Thu, 13 May 2021 01:49:18 +0000 (09:49 +0800)
commit9533092f7557e2f728d5fc59836ceac19658291d
tree2085f8fde3130f9d4559234e458a91ad6f8e4424
parente84fae5a9caea3e3ad1dda84f29125742ebd0fd1
MA-18166 Android: Fix mmc multi blk load issue

The 'offset' can be negative number passed from fsl_read_from_partition_multi(),
don't covert 'blksz' to 'uint64_t' as it will cause overflow when the 'offset'
is negative number.

Test: mmc blk read with 'offset < 0'.

Signed-off-by: Ji Luo <ji.luo@nxp.com>
Change-Id: Id1ce8e0c748dd280d70c1722cc7d17cc9646a4bb
(cherry picked from commit 077b448679b9ad2891495c7344ba99a6c10a59fb)
(cherry picked from commit f927599650ba1fbdbe8f4887b970a4f003b0d277)
lib/avb/fsl/utils.c