From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joe Hershberger Date: Tue, 10 Jul 2012 13:35:41 -0500 Subject: [U-Boot] [PATCH RESEND] tftp: fix type of block arg to store_block In-Reply-To: <1341901134-7826-1-git-send-email-jayachandranc@netlogicmicro.com> References: <1341901134-7826-1-git-send-email-jayachandranc@netlogicmicro.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Jayachandran C, On Tue, Jul 10, 2012 at 1:18 AM, Jayachandran C wrote: > [Sending again, probably for the last time. This is a simple fix for an > obvious issue, please merge if you are convinced :) ] > > The block argument for store_block can be -1 when the tftp sequence > number rolls over (i.e TftpBlock == 0), so the first argument to > store_block has to be of type 'int' instead of 'unsigned'. > > In our environment (gcc 4.4.5 mips toolchain), this causes incorrect > 'offset' to be generated for storing the block, and the tftp block > with number 0 will be written elsewhere, resulting in a bad block in > the downloaded file and a memory corruption. > > Signed-off-by: Jayachandran C Something about your email is not being pulled into patchwork. Perhaps it hasn't made it past a list moderator? Thanks, -Joe