]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
V4L/DVB: uvcvideo: Prevent division by 0 when control step value is 0
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Sun, 25 Apr 2010 19:27:14 +0000 (16:27 -0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 5 Jul 2010 18:22:56 +0000 (11:22 -0700)
commiteaeb91e532a4d68d51825bd0ed82f0955c9e3250
treef409bdbfd0cebd2cfd421848fe7dfa0c73234c56
parent135b48da0c911dbd8aa4c52742b9022643bc02a3
V4L/DVB: uvcvideo: Prevent division by 0 when control step value is 0

commit cf7a50eeb6f462a0b7d1619fcb27a727a2981769 upstream.

The control step values reported by the device are used as a divisor
unchecked, which can result in a division by zero.

Check the step value and make it 1 when null.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/media/video/uvc/uvc_ctrl.c