diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2009-08-10 21:07:54 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-08-13 19:39:14 -0400 |
commit | bb2b4542b6415044894cd7c147ff54840dd8ed3f (patch) | |
tree | 6c2157ea5d794ea3b904132be2f9d3f96096552a /drivers/media/video/bw-qcam.c | |
parent | 27059b35397fc7cf2cbf5b4b99d912bbc06aff4d (diff) |
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/video/bw-qcam.c')
-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) | |||
992 | 992 | ||
993 | if (parport[0] && strncmp(parport[0], "auto", 4) != 0) { | 993 | if (parport[0] && strncmp(parport[0], "auto", 4) != 0) { |
994 | /* user gave parport parameters */ | 994 | /* user gave parport parameters */ |
995 | for(n=0; parport[n] && n<MAX_CAMS; n++){ | 995 | for (n = 0; n < MAX_CAMS && parport[n]; n++) { |
996 | char *ep; | 996 | char *ep; |
997 | unsigned long r; | 997 | unsigned long r; |
998 | r = simple_strtoul(parport[n], &ep, 0); | 998 | r = simple_strtoul(parport[n], &ep, 0); |