[RESEND PATCH] drivers/mtd/ubispl/ubispl.c: limit copy size

Heiko Schocher hs at nabladev.com
Thu Oct 9 06:12:13 CEST 2025


Hello Benedikt,

On 17.09.25 11:14, Benedikt Spranger wrote:
> The fastmap VID header is embedded in struct ubi_scan_info. During fastmap
> scan, the header is copied into struct ubi_scan_info, if valid. The former
> code mixed up the amount of copied bytes and copied more bytes than
> nessesary. This had no side effect, since the affected struct members are
> uninitialized at that point and overwritten later.
> 
> Limit the copied bytes to the VID header size.
> 
> Signed-off-by: Benedikt Spranger <b.spranger at linutronix.de>
> Reported-by: Andrew Goodbody <andrew.goodbody at linaro.org>
> ---
>   drivers/mtd/ubispl/ubispl.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Applied to u-boot-ubi

Thanks!

bye,
Heiko
-- 
Nabla Software Engineering
HRB 40522 Augsburg
Phone: +49 821 45592596
E-Mail: office at nabladev.com
Geschäftsführer : Stefano Babic


More information about the U-Boot mailing list