projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
84d3dc2
)
ALSA: hda - Read buffer overflow
author
Roel Kluin
<
[email protected]
>
Sun, 2 Aug 2009 11:30:45 +0000
(13:30 +0200)
committer
Takashi Iwai
<
[email protected]
>
Mon, 3 Aug 2009 06:34:06 +0000
(08:34 +0200)
Check whether index is within bounds before testing the element.
Signed-off-by: Roel Kluin <
[email protected]
>
Signed-off-by: Takashi Iwai <
[email protected]
>
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 f6b4cbf1ead012c20165f139caa2529326f01185..51c44fdbc0f0ab071d6386efc234cf51b3eb9a52 100644
(file)
--- a/
sound/pci/hda/patch_realtek.c
+++ b/
sound/pci/hda/patch_realtek.c
@@
-559,7
+559,7
@@
static int alc_pin_mode_get(struct snd_kcontrol *kcontrol,
/* Find enumerated value for current pinctl setting */
i = alc_pin_mode_min(dir);
- while (
alc_pin_mode_values[i] != pinctl && i <= alc_pin_mode_max(dir)
)
+ while (
i <= alc_pin_mode_max(dir) && alc_pin_mode_values[i] != pinctl
)
i++;
*valp = i <= alc_pin_mode_max(dir) ? i: alc_pin_mode_min(dir);
return 0;