public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Thomas Hebb <tommyhebb@gmail.com>
Cc: u-boot@lists.denx.de, Alexandru Gagniuc <mr.nuke.me@gmail.com>,
	Joel Stanley <joel@jms.id.au>,
	Naoki Hayama <naoki.hayama@lineo.co.jp>,
	Simon Glass <sjg@chromium.org>,
	Yann Dirson <yann@blade-group.com>
Subject: Re: [PATCH] mkimage: clarify error message for empty input files
Date: Thu, 2 Sep 2021 09:28:58 -0400	[thread overview]
Message-ID: <20210902132858.GC858@bill-the-cat> (raw)
In-Reply-To: <7c0f1ff7f8f77dd94cd74e7907b488d3a0a1e492.1627856591.git.tommyhebb@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 706 bytes --]

On Sun, Aug 01, 2021 at 03:23:13PM -0700, Thomas Hebb wrote:

> Currently, an empty imput file causes `mmap()` to fail, and you get an
> error like "mkimage: Can't read file.img: Invalid argument", which is
> extremely unintuitive and hard to diagnose if you don't know what to
> look for. Add an explicit check for an empty file and provide a clear
> error message instead.
> 
> We already bounds check the image size when listing and re-signing
> existing images, so we only need this check here, when opening data
> files going into a image.
> 
> Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/next, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

      parent reply	other threads:[~2021-09-02 13:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-01 22:23 [PATCH] mkimage: clarify error message for empty input files Thomas Hebb
2021-08-01 22:25 ` Tom Hebb
2021-08-02 19:21 ` Simon Glass
2021-09-02 13:28 ` Tom Rini [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=20210902132858.GC858@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=joel@jms.id.au \
    --cc=mr.nuke.me@gmail.com \
    --cc=naoki.hayama@lineo.co.jp \
    --cc=sjg@chromium.org \
    --cc=tommyhebb@gmail.com \
    --cc=u-boot@lists.denx.de \
    --cc=yann@blade-group.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox