[PATCH] tools: imximage: Fix check array index
sbabic at denx.de
sbabic at denx.de
Tue Jan 31 10:49:54 CET 2023
> The struct dcd_v1_t is initialized to MAX_HW_CFG_SIZE_V1 (60)
> structs 'dcd_type_addr_data_t', so the indexes to use on its elements
> are [0,59]. But on line 478, the variable 'length' can take on the value
> 60, which applies to array overflow: cd_v1->addr_data[length].type Thus,
> it is necessary to tighten the check on the 'size' variable on line 463.
> Fixes: 0b0c6af38738 ("Prepare v2020.01")
> Signed-off-by: Mikhail Ilin <ilin.mikhail.ol at gmail.com>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
More information about the U-Boot
mailing list