[U-Boot] [PATCH RESEND] tftp: fix type of block arg to store_block

Joe Hershberger joe.hershberger at gmail.com
Tue Jul 10 20:35:41 CEST 2012


Hi Jayachandran C,

On Tue, Jul 10, 2012 at 1:18 AM, Jayachandran C
<jayachandranc at netlogicmicro.com> 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 <jayachandranc at netlogicmicro.com>

Something about your email is not being pulled into patchwork.
Perhaps it hasn't made it past a list moderator?

Thanks,
-Joe


More information about the U-Boot mailing list