summaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2009-08-11 03:07:54 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-08-14 01:39:14 +0200
commitbb2b4542b6415044894cd7c147ff54840dd8ed3f (patch)
tree6c2157ea5d794ea3b904132be2f9d3f96096552a /drivers/media
parentV4L/DVB (12437): dvb: siano uses/depends on INPUT (diff)
downloadlinux-bb2b4542b6415044894cd7c147ff54840dd8ed3f.tar.xz
linux-bb2b4542b6415044894cd7c147ff54840dd8ed3f.zip
V4L/DVB (12438): Read buffer overflow
parport[n] is checked before n < MAX_CAMS Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/bw-qcam.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/bw-qcam.c b/drivers/media/video/bw-qcam.c
index 10dbd4a11b30..9e39bc5f7b00 100644
--- a/drivers/media/video/bw-qcam.c
+++ b/drivers/media/video/bw-qcam.c
@@ -992,7 +992,7 @@ static int accept_bwqcam(struct parport *port)
if (parport[0] && strncmp(parport[0], "auto", 4) != 0) {
/* user gave parport parameters */
- for(n=0; parport[n] && n<MAX_CAMS; n++){
+ for (n = 0; n < MAX_CAMS && parport[n]; n++) {
char *ep;
unsigned long r;
r = simple_strtoul(parport[n], &ep, 0);