From: Tom Rini Date: Thu, 1 Oct 2020 10:09:52 -0400 Subject: [PATCH 2/3] net: tftp: Fix store_block offset calculation In-Reply-To: <20200825022637.93123-3-ley.foon.tan@intel.com> References: <20200825022637.93123-1-ley.foon.tan@intel.com> <20200825022637.93123-3-ley.foon.tan@intel.com> Message-ID: <20201001140952.GL14816@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, Aug 25, 2020 at 10:26:36AM +0800, Ley Foon Tan wrote: > tftp_cur_block start with 1 for first block, but tftp_cur_block counter is > start with zero when block number is rollover. The existing code > "tftp_cur_block - 1" will cause the block number become -1 in store_block() > when tftp_cur_block is 0 when tftp_cur_block is rollover. > > The fix pass in tftp_cur_block to store_block() and minus the > tftp_block_size when do the offset calculation. > > Signed-off-by: Ley Foon Tan > Reviewed-By: Ramon Fried 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: