ASoC: max9867: silence and array overflow warning
Subsystems (3)
PATCH 2/2 ASoC: max9867: silence and array overflow warning
Smatch complains that we might reach the end of this loop without finding what we're looking for leading to a buffer overflow.
sound/soc/codecs/max9867.c +2 -0
@@ -156,6 +156,8 @@ static inline int get_ni_value(int mclk, int rate)if (ni_div[i].mclk >= mclk)break ; } +if (i =ARRAY_SIZE (ni_div)) +return -EINVAL ;switch (rate) {case 8000 :
2016-02-25 15:50 GMT+08:00 Dan Carpenter <[email protected]>:
Quoted 4 lines
Smatch complains that we might reach the end of this loop without finding what we're looking for leading to a buffer overflow.
Signed-off-by Dan Carpenter <[email protected]>
Mark Brown
maintainerApplied "ASoC: max9867: silence and array overflow warning" to the asoc tree
In reply to Dan CarpenterThe patch
ASoC: max9867: silence and array overflow warning
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
90966391005e69a8964350278917a87fe49adf0fMon Sep 17 00:00:00 2001
From: Dan Carpenter <[email protected]>
Date: Thu, 25 Feb 2016 10:50:38 +0300
Subject: [PATCH] ASoC: max9867: silence and array overflow warning
Smatch complains that we might reach the end of this loop without finding what we're looking for leading to a buffer overflow.
--- sound/soc/codecs/max9867.c | 2 ++ 1 file changed, 2 insertions(+)
sound/soc/codecs/max9867.c +2 -0
@@ -156,6 +156,8 @@ static inline int get_ni_value(int mclk, int rate)if (ni_div[i].mclk >= mclk)break ; } +if (i ==ARRAY_SIZE (ni_div)) +return -EINVAL ;switch (rate) {case 8000 :
Signature · 1 line
2.7.0