sound: oss/sb_audio: prevent divide by zero bug
authorDan Carpenter <dan.carpenter@oracle.com>
Sat, 18 Aug 2012 15:55:15 +0000 (18:55 +0300)
committerTakashi Iwai <tiwai@suse.de>
Mon, 20 Aug 2012 08:24:21 +0000 (10:24 +0200)
commit94f3ec6b2222eb5c0af0c784f0656ff5b909d870
treed67fe0f941e81a1c47d9b49de144f62aeda5c4ee
parent5e68fb3cab23b327e9f15803607e697d7eea1966
sound: oss/sb_audio: prevent divide by zero bug

Speed comes from get_user() in audio_ioctl().  We use it to set the "s"
variable before clamping it to valid values so it could lead to a divide
by zero bug.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/oss/sb_audio.c