[U-Boot] mtdparts: Fix final outstanding issue reported by Coverity

Tom Rini trini at konsulko.com
Sat Aug 26 20:46:44 UTC 2017


On Sun, Aug 20, 2017 at 08:05:40PM -0400, Tom Rini wrote:

> As part of fixing the previously reported issues, it was missed that in
> the case of mtdparts_init() we need to make sure that tmp_ep is long
> enough to contain PARTITION_MAXLEN and a NULL termination.  Then, to be
> sure the buffer is NULL terminated, zero the entire buffer rather than
> just ensuring the first character is NULL.
> 
> Cc: Lothar WaƟmann <LW at KARO-electronics.de>
> Cc: Maxime Ripard <maxime.ripard at free-electrons.com>
> Reported-by: Coverity (CID: 166329)
> Signed-off-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/20170826/996d56eb/attachment.sig>


More information about the U-Boot mailing list