mtd: bcm63xxpart: Null terminate and validate conversion of flash strings
authorSimon Arlott <simon@fire.lp0.eu>
Sun, 13 Dec 2015 22:51:37 +0000 (22:51 +0000)
committerBrian Norris <computersforpeace@gmail.com>
Fri, 12 Feb 2016 18:34:16 +0000 (10:34 -0800)
commit2c4fd433fb934c7d5ed02113a5eaa3edb42ea10b
treea3a0427b29bc527c87ed525a4a57879e0cb05ea2
parent7fffa694a8917af0c553ab48290a57e3674aa5d3
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>
drivers/mtd/bcm63xxpart.c