forked from Minki/linux
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: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
parent
6020779b11
commit
b5f3d7af28
@ -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;
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user