ALSA: hda - add bounds checking for the codec command fields
authorWu Fengguang <fengguang.wu@intel.com>
Fri, 17 Jul 2009 08:49:19 +0000 (16:49 +0800)
committerTakashi Iwai <tiwai@suse.de>
Fri, 17 Jul 2009 09:18:21 +0000 (11:18 +0200)
commit6430aeeb30b478d4ef25f988b1fde6f6ae83adb5
treed9888582ec7a4bb9c6e7f3a52be543c408c2d742
parent9176b672c29baaa94cdff4eedf1350a3b553d9ea
ALSA: hda - add bounds checking for the codec command fields

A recent bug involves passing auto detected >0x7f NID to codec command,
creating an invalid codec addr field, and finally lead to cmd timeout
and fall back into single command mode. Jaroslav fixed that bug in
alc880_parse_auto_config().

It would be safer to further check the bounds of all cmd fields.

Cc: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_codec.c