1
0
Fork 0

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>
hifive-unleashed-5.1
Dan Carpenter 2013-11-08 12:46:10 +03:00 committed by Mark Brown
parent 6020779b11
commit b5f3d7af28
1 changed files with 1 additions and 1 deletions

View File

@ -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;
/*