]> git.baikalelectronics.ru Git - kernel.git/commit
pinctrl: freescale: off by one in imx1_pinconf_group_dbg_show()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 13 Jul 2018 14:55:15 +0000 (17:55 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 1 Aug 2018 21:01:07 +0000 (23:01 +0200)
commitbffc213b6411194c1e9be0ee926a263dc8d9613a
tree75f39dcb2ba818d4e93570c1dc00f42ef2c60c72
parentdbd1aad2abf61ca28e64d0f7dba0dc7486f9a359
pinctrl: freescale: off by one in imx1_pinconf_group_dbg_show()

The info->groups[] array is allocated in imx1_pinctrl_parse_dt().  It
has info->ngroups elements.  Thus the > here should be >= to prevent
reading one element beyond the end of the array.

Cc: stable@vger.kernel.org
Fixes: 227fb15e73a0 ("pinctrl: imx1 core driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Uwe Kleine-König <u.kleine-könig@pengutronix.de>
Acked-by: Dong Aisheng <Aisheng.dong@nxp.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/freescale/pinctrl-imx1-core.c