From: Dan Carpenter Date: Thu, 16 Sep 2010 18:13:47 +0000 (+0200) Subject: ALSA: usb/mixer: remove bogus cast X-Git-Tag: v2.6.37-rc1~126^2~2^2~33 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=26e34e9e15aa48e9375ea4e97bc4234ad995b7c8;p=pandora-kernel.git ALSA: usb/mixer: remove bogus cast "uinfo->value.enumerated.item" is an unsigned int. If it's negative when we do the comparison: if ((int)uinfo->value.enumerated.item >= cval->max) then we would read past the end of the array on the next line. I also changed the strcpy() to strlcpy() out of paranoia. Signed-off-by: Dan Carpenter Signed-off-by: Takashi Iwai --- Reading git-diff-tree failed