Skip to content

Commit

Permalink
V4L/DVB (12438): Read buffer overflow
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Roel Kluin authored and Mauro Carvalho Chehab committed Aug 13, 2009
1 parent 27059b3 commit bb2b454
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/video/bw-qcam.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit bb2b454

Please sign in to comment.