ASoC: rcar: off by one in rsnd_scu_set_route()
Subsystems (4)
PATCH 1/1 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 <[email protected]>
sound/soc/sh/rcar/scu.c +1 -1
@@ -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 ;/*
Hi
sound/soc/sh/rcar/scu.c
Quoted 9 lines
If "id ==
ARRAY_SIZE(routes)" then we read one space beyond the end of the routes[] array.Signed-off-by Dan Carpenter <[email protected]>sound/soc/sh/rcar/scu.c +0
-0
Nice catch
Quoted 9 lines
sound/soc/sh/rcar/scu.c +1
-1@@ -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 ;/*
Quoted 4 lines
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Best regards
---
Kuninori Morimoto
Quoted 2 lines · Dan Carpenter
If "id ==
ARRAY_SIZE(routes)" then we read one space beyond the end of the routes[] array.
Applied, thanks.