[PATCH v2] fastboot: Fix overflow when calculating chunk size

Tom Rini trini at konsulko.com
Wed Jun 2 01:14:01 CEST 2021


On Thu, May 27, 2021 at 12:02:34PM -0400, Sean Anderson wrote:

> If a chunk was larger than 4GiB, then chunk_data_sz would overflow and
> blkcnt would not be calculated correctly. Upgrade it to a u64 and cast
> its multiplicands as well. Also fix bytes_written while we're at it.
> 
> Signed-off-by: Sean Anderson <sean.anderson at seco.com>
> Reviewed-by: Heiko Schocher <hs at denx.de>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210601/2fd62ebb/attachment.sig>


More information about the U-Boot mailing list