projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2ea659a
)
ASoC: ak4613: Fix out of bounds array access for ak4613_iface
author
Axel Lin
<axel.lin@ingics.com>
Fri, 9 Jun 2017 07:01:21 +0000
(15:01 +0800)
committer
Mark Brown
<broonie@kernel.org>
Fri, 9 Jun 2017 17:39:25 +0000
(18:39 +0100)
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/ak4613.c
patch
|
blob
|
history
diff --git
a/sound/soc/codecs/ak4613.c
b/sound/soc/codecs/ak4613.c
index
b2dfdde
..
9879186
100644
(file)
--- a/
sound/soc/codecs/ak4613.c
+++ b/
sound/soc/codecs/ak4613.c
@@
-345,7
+345,7
@@
static int ak4613_dai_hw_params(struct snd_pcm_substream *substream,
if (ak4613_dai_fmt_matching(priv->iface, is_play, fmt, width))
iface = priv->iface;
} else {
- for (i = ARRAY_SIZE(ak4613_iface); i >= 0; i--) {
+ for (i = ARRAY_SIZE(ak4613_iface)
- 1
; i >= 0; i--) {
if (!ak4613_dai_fmt_matching(ak4613_iface + i,
is_play,
fmt, width))