On 21/09/2015 23:02, Troy Kisky wrote:
> Signed-off-by: Troy Kisky <[email protected]>
> ---
>  tools/imximage.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/imximage.c b/tools/imximage.c
> index 97a6880..7c21922 100644
> --- a/tools/imximage.c
> +++ b/tools/imximage.c
> @@ -396,8 +396,8 @@ static void print_hdr_v2(struct imx_header *imx_hdr)
>       dcd_v2_t *dcd_v2 = &hdr_v2->dcd_table;
>       uint32_t size, version;
>  
> -     size = be16_to_cpu(dcd_v2->header.length) - 8;
> -     if (size > (MAX_HW_CFG_SIZE_V2 * sizeof(dcd_addr_data_t))) {
> +     size = be16_to_cpu(dcd_v2->header.length);
> +     if (size > (MAX_HW_CFG_SIZE_V2 * sizeof(dcd_addr_data_t)) + 8) {
>               fprintf(stderr,
>                       "Error: Image corrupt DCD size %d exceed maximum %d\n",
>                       (uint32_t)(size / sizeof(dcd_addr_data_t)),
> 

Applied to u-boot-imx (fix), thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================
_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to