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

Tom Rini trini at konsulko.com
Mon Nov 7 02:15:40 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>

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>


More information about the U-Boot mailing list