From: Takashi Iwai Date: Thu, 13 Oct 2011 06:19:09 +0000 (+0200) Subject: ALSA: usb-audio - Fix possible access over audio_feature_info[] array X-Git-Tag: v3.2-rc1~127^2~3^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d09c06c6fc240261dde65198774b279d89c35459;p=pandora-kernel.git ALSA: usb-audio - Fix possible access over audio_feature_info[] array The audio_feature_info[] array should contain all entries for UAC2_FU_*, but currently a few last entries are missing. Even though, the driver tries to probe these entries in parse_audio_feature_unit() and may access the range over the array. This patch fixes the bug by limiting the loop size properly using ARRAY_SIZE() instead of a hard-coded magic number. Reported-by: Dan Carpenter Signed-off-by: Takashi Iwai --- Reading git-diff-tree failed