projects
/
profile
/
ivi
/
kernel-x86-ivi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1f04661
)
ALSA: hda - Always check array bounds in alc_get_line_out_pfx
author
David Henningsson
<david.henningsson@canonical.com>
Wed, 17 Oct 2012 10:43:44 +0000
(12:43 +0200)
committer
Takashi Iwai
<tiwai@suse.de>
Wed, 17 Oct 2012 11:00:18 +0000
(13:00 +0200)
Even when CONFIG_SND_DEBUG is not enabled, we don't want to
return an arbitrary memory location when the channel count is
larger than we expected.
Cc: stable@kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_realtek.c
patch
|
blob
|
history
diff --git
a/sound/pci/hda/patch_realtek.c
b/sound/pci/hda/patch_realtek.c
index 8253b4eeb6a1bea0687675e8ac66ca41b9a84758..48d9d609f89b06bca17210b8ca9dfaec2a600c1d 100644
(file)
--- a/
sound/pci/hda/patch_realtek.c
+++ b/
sound/pci/hda/patch_realtek.c
@@
-2598,8
+2598,10
@@
static const char *alc_get_line_out_pfx(struct alc_spec *spec, int ch,
return "PCM";
break;
}
- if (snd_BUG_ON(ch >= ARRAY_SIZE(channel_name)))
+ if (ch >= ARRAY_SIZE(channel_name)) {
+ snd_BUG();
return "PCM";
+ }
return channel_name[ch];
}