Skip to content

Commit

Permalink
ALSA: ak4xx-adda: info leak in ak4xxx_capture_source_info()
Browse files Browse the repository at this point in the history
"idx" is controled by the user and can be a negative offset into the
input_names[] array.

Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
Dan Carpenter authored and tiwai committed Jun 26, 2013
1 parent f02fe86 commit bd5fe73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/i2c/other/ak4xxx-adda.c
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ static int ak4xxx_capture_source_info(struct snd_kcontrol *kcontrol,
struct snd_akm4xxx *ak = snd_kcontrol_chip(kcontrol);
int mixer_ch = AK_GET_SHIFT(kcontrol->private_value);
const char **input_names;
int num_names, idx;
unsigned int num_names, idx;

num_names = ak4xxx_capture_num_inputs(ak, mixer_ch);
if (!num_names)
Expand Down

0 comments on commit bd5fe73

Please sign in to comment.