diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2009-08-10 22:07:54 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-08-13 20:39:14 -0300 |
commit | bb2b4542b6415044894cd7c147ff54840dd8ed3f (patch) | |
tree | 6c2157ea5d794ea3b904132be2f9d3f96096552a /drivers/media | |
parent | 27059b35397fc7cf2cbf5b4b99d912bbc06aff4d (diff) | |
download | blackbird-op-linux-bb2b4542b6415044894cd7c147ff54840dd8ed3f.tar.gz blackbird-op-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.c | 2 |
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); |