[PATCH 3/3] net: tftp: Fix load_block offset calculation

Tom Rini trini at konsulko.com
Thu Oct 1 16:09:58 CEST 2020


On Tue, Aug 25, 2020 at 10:26:37AM +0800, Ley Foon Tan wrote:

> When load the last block, the "len" might not be a block size. This cause
> loading the incorrect last block data.
> 
> The fix change "len" to tftp_block_size and minus one tftp_block_size
> for offset calculation.
> 
> Use same offset calculation formula as in store_block().
> 
> Signed-off-by: Ley Foon Tan <ley.foon.tan at intel.com>
> Reviewed-By: Ramon Fried <rfried.dev at gmail.com>

Applied to u-boot/next, 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/20201001/6f656cb1/attachment.sig>


More information about the U-Boot mailing list