From mboxrd@z Thu Jan 1 00:00:00 1970 From: Troy Kisky Date: Mon, 5 Oct 2015 16:17:27 -0700 Subject: [U-Boot] [PATCH 1/1] imximage: header.length of 4 is valid In-Reply-To: <1442869368-370-1-git-send-email-troy.kisky@boundarydevices.com> References: <1442869368-370-1-git-send-email-troy.kisky@boundarydevices.com> Message-ID: <56130507.9000906@boundarydevices.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 9/21/2015 2:02 PM, Troy Kisky wrote: > Signed-off-by: Troy Kisky > --- > 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)), > Hi Stefano, Are there outstanding concerns about applying this patch and then applying imximage: fix commands other than write_data Where you replied "This patch breaks building boards with SPL: Building current source for 85 boards (6 threads, 1 job per thread) arm: + colibri_vf_dtb +Error: Image corrupt DCD size 536870911 exceed maximum 220 +make[2]: *** [u-boot-dtb.imx] Error 1 +make[1]: *** [u-boot-dtb.imx] Error 2 +make: *** [sub-make] Error 2 arm: + mx6sabresd_spl +Error: Image corrupt DCD size 536870911 exceed maximum 220 " Or would you rather that I squash them together? Thanks Troy