I got this, and it certainly seems relevant,.
It would seem that that whole 'quality' thing needs some range
checking, it should presumably be in the range [1..100] in order to
avoid negative 'sc' values or the divide-by-zero.
Hans, Mauro?
Linus
---------- Forwarded message ----------
From: Peter Kovář <[email protected]>
Date: Sun, Feb 8, 2015 at 2:18 PM
Subject: divide error: 0000 in the gspca_topro
To: Linus Torvalds <[email protected]>
Hi++ Linus!
There is a trivial bug in the gspca_topro webcam driver.
/* set the JPEG quality for sensor soi763a */
static void jpeg_set_qual(u8 *jpeg_hdr,
int quality)
{
int i, sc;
if (quality < 50)
sc = 5000 / quality;
else
sc = 200 - quality * 2;
Crash can be reproduced by setting JPEG quality to zero in the guvcview
application.
Cheers,
Peter Kovář
50 65 74 65 72 20 4B 6F 76 C3 A1 C5 99
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html