From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/1] imximage: header.length of 4 is valid
Date: Wed, 7 Oct 2015 14:03:49 +0200 [thread overview]
Message-ID: <56150A25.8020705@denx.de> (raw)
In-Reply-To: <1442869368-370-1-git-send-email-troy.kisky@boundarydevices.com>
On 21/09/2015 23:02, Troy Kisky wrote:
> Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
> ---
> 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: sbabic at denx.de
=====================================================================
prev parent reply other threads:[~2015-10-07 12:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-21 21:02 [U-Boot] [PATCH 1/1] imximage: header.length of 4 is valid Troy Kisky
2015-10-05 23:17 ` Troy Kisky
2015-10-06 11:30 ` stefano babic
2015-10-06 18:09 ` Troy Kisky
2015-10-07 8:01 ` Stefano Babic
2015-10-07 12:03 ` Stefano Babic [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56150A25.8020705@denx.de \
--to=sbabic@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.