]> git.baikalelectronics.ru Git - uboot.git/commit
mtdparts: Fix final outstanding issue reported by Coverity
authorTom Rini <trini@konsulko.com>
Mon, 21 Aug 2017 00:05:40 +0000 (20:05 -0400)
committerTom Rini <trini@konsulko.com>
Sat, 26 Aug 2017 18:56:13 +0000 (14:56 -0400)
commit4cf66d75579905a38e32f6131cdb494d268fac30
treedffabb67a38d87800381c45d5915bd9aa7e8d1d1
parent3c1e398e0523069073443ec5379beb90cceaa0fc
mtdparts: Fix final outstanding issue reported by Coverity

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@KARO-electronics.de>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Reported-by: Coverity (CID: 166329)
Signed-off-by: Tom Rini <trini@konsulko.com>
cmd/mtdparts.c