[U-Boot] [PATCH] tools: imximage: check return value when open the plugin file

Tom Rini trini at konsulko.com
Fri Nov 4 12:21:44 CET 2016


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 at nxp.com>
> Cc: Stefano Babic <sbabic at denx.de>
> Cc: Tom Rini <trini at konsulko.com>

Reported-by: Coverity (CID: 153926)
Reviewed-by: Tom Rini <trini at konsulko.com>

-- 
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/20161104/d41a3a33/attachment.sig>


More information about the U-Boot mailing list