提交 19da44cd 编写于 作者: D Dan Carpenter 提交者: Linus Walleij

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: 30612cd9 ("pinctrl: imx1 core driver")
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: NUwe Kleine-König <u.kleine-könig@pengutronix.de>
Acked-by: NDong Aisheng <Aisheng.dong@nxp.com>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 24d1c217
......@@ -429,7 +429,7 @@ static void imx1_pinconf_group_dbg_show(struct pinctrl_dev *pctldev,
const char *name;
int i, ret;
if (group > info->ngroups)
if (group >= info->ngroups)
return;
seq_puts(s, "\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册