mtd: bcm63xxpart: Null terminate and validate conversion of flash strings

Strings read from flash could be missing null termination characters, or
not contain valid integers.

Null terminate the strings and check for errors when converting them to
integers.

Also validate that the addresses are at least BCM963XX_EXTENDED_SIZE
because this will be subtracted from them.

Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
This commit is contained in:
Simon Arlott 2015-12-13 22:51:37 +00:00 • committed by Brian Norris
commit 2c4fd433fb