From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] tools: imximage: check return value when open the plugin file
Date: Sun, 6 Nov 2016 20:15:40 -0500 [thread overview]
Message-ID: <20161107011540.GK20830@bill-the-cat> (raw)
In-Reply-To: <1478226795-18634-1-git-send-email-peng.fan@nxp.com>
On Fri, Nov 04, 2016 at 10:33:15AM +0800, Peng Fan wrote:
> Check return value when open the plugin file.
>
> Coverity report:
> ** CID 153926: Error handling issues (NEGATIVE_RETURNS)
> /tools/imximage.c: 542 in copy_plugin_code()
>
> ifd = open(plugin_file, O_RDONLY|O_BINARY);
> >>> CID 153926: Error handling issues (NEGATIVE_RETURNS)
> >>> "ifd" is passed to a parameter that cannot be negative.
>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> Cc: Stefano Babic <sbabic@denx.de>
> Cc: Tom Rini <trini@konsulko.com>
> Reported-by: Coverity (CID: 153926)
> Reviewed-by: Tom Rini <trini@konsulko.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161106/61e08b79/attachment.sig>
prev parent reply other threads:[~2016-11-07 1:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-04 2:33 [U-Boot] [PATCH] tools: imximage: check return value when open the plugin file Peng Fan
2016-11-04 11:21 ` Tom Rini
2016-11-07 1:15 ` 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=20161107011540.GK20830@bill-the-cat \
--to=trini@konsulko.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox