]> git.baikalelectronics.ru Git - uboot.git/commit
mtd: Make sure the name passed in mtdparts fits in mtd_name[]
authorBoris Brezillon <boris.brezillon@bootlin.com>
Sun, 2 Dec 2018 09:54:28 +0000 (10:54 +0100)
committerJagan Teki <jagan@amarulasolutions.com>
Wed, 5 Dec 2018 19:15:36 +0000 (00:45 +0530)
commit578aa15e1cbb9f929d512e2adc6a62e640a49c18
tree64a94f9703030b27dc035d31ca7642d15a325976
parentc38587b7e5f56ead2ac1e7bdd4333138ce1ef925
mtd: Make sure the name passed in mtdparts fits in mtd_name[]

The local mtd_name[] variable is limited in size. Return an error if
the name passed in mtdparts does not fit in this local var.

Fixes: 3a11299ea117 ("cmd: mtd: add 'mtd' command")
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Tested-by: Heiko Schocher <hs@denx.de>
drivers/mtd/mtd_uboot.c