From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Sun, 6 Nov 2016 20:15:40 -0500 Subject: [U-Boot] tools: imximage: check return value when open the plugin file In-Reply-To: <1478226795-18634-1-git-send-email-peng.fan@nxp.com> References: <1478226795-18634-1-git-send-email-peng.fan@nxp.com> Message-ID: <20161107011540.GK20830@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > Cc: Stefano Babic > Cc: Tom Rini > Reported-by: Coverity (CID: 153926) > Reviewed-by: Tom Rini 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: