提交 b5f3d7af 编写于 作者: D Dan Carpenter 提交者: Mark Brown

ASoC: rcar: off by one in rsnd_scu_set_route()

If "id == ARRAY_SIZE(routes)" then we read one space beyond the end of
the routes[] array.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Acked-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: NMark Brown <broonie@linaro.org>
上级 6020779b
......@@ -68,7 +68,7 @@ static int rsnd_scu_set_route(struct rsnd_priv *priv,
return 0;
id = rsnd_mod_id(mod);
if (id < 0 || id > ARRAY_SIZE(routes))
if (id < 0 || id >= ARRAY_SIZE(routes))
return -EIO;
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册