mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-01 10:33:27 +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
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue