mirror of
https://github.com/torvalds/linux.git
synced 2024-12-12 06:02:38 +00:00
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>
This commit is contained in:
parent
27059b3539
commit
bb2b4542b6
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user