From: Tom Rini Date: Sat, 12 Oct 2019 16:23:43 -0400 Subject: [U-Boot] [PATCH 1/7] spl: ymodem: Fix FIT loading termination handling In-Reply-To: <20190815205532.16545-2-dannenberg@ti.com> References: <20190815205532.16545-1-dannenberg@ti.com> <20190815205532.16545-2-dannenberg@ti.com> Message-ID: <20191012202343.GG16029@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 Thu, Aug 15, 2019 at 03:55:26PM -0500, Andreas Dannenberg wrote: > During FIT reading through ymodem_read_fit() the function > xyzModem_stream_read() is being used which returns zero once the end > of a stream has been reached. This could lead to an premature exit from > ymodem_read_fit() with certain-sized FIT images reporting that zero > bytes overall were read. Such a premature exit would then result in an > -EIO failure being triggered within the spl_load_simple_fit() caller > function and ultimately lead to a boot failure. > > Fix this logic by simply aborting the stream read loops and continuing > with the regular code flow which ultimately would lead to returning > the number of bytes to be read ('size') as expected by the callers of > ymodem_read_fit(). > > Fixes: fa715193c083 ("spl: Add an option to load a FIT containing U-Boot from UART") > Signed-off-by: Andreas Dannenberg Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: