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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Sep 2018 07:26:39 +0000 (09:26 +0200)
commit42228037aa5fd789fbde006b1ff74c8ae5c4f93f
treed1bcf2da1817b3e5c6bae9e6a368eb390e5b664a
parent7806d2ef49042e5941869363042089768552211f
pinctrl: freescale: off by one in imx1_pinconf_group_dbg_show()

commit 19da44cd33a3a6ff7c97fff0189999ff15b241e4 upstream.

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: 30612cd90005 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pinctrl/freescale/pinctrl-imx1-core.c