[PATCH] xyzModem: Correct xmodem blk verification conditions

Dan Carpenter dan.carpenter at linaro.org
Mon Feb 5 15:25:35 CET 2024


On Mon, Feb 05, 2024 at 02:58:50PM +0800, Hongbin Ji wrote:
> When the blk sequence number is 255 and cblk is 0, the original XOR condition
> produces a result of 0,and the judgment condition will be unsuccessful.
> 

This code is 18 years old so it's surprising that it's causing an issue
now.  This was added in commit f2841d377060 ("Add support for ymodem
protocol (loady command). Patch by Stefano Babic, 29 Mar 2006").

Not just 255 and zero but any time "blk == 255 - cblk" then your new
condition will be true where the original condition was false.  Is that
really intentional?  Is this from reviewing documentation or something?
What documents?  Or is it from testing?

regards,
dan carpenter



More information about the U-Boot mailing list