Explorar o código

Input: db9 - fix potential buffer overrun

Fixes Coverity #id 483

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Eric Sesterhenn %!s(int64=19) %!d(string=hai) anos
pai
achega
0a3a6d69b7
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      drivers/input/joystick/db9.c

+ 1 - 1
drivers/input/joystick/db9.c

@@ -584,7 +584,7 @@ static struct db9 __init *db9_probe(int parport, int mode)
 		goto err_out;
 		goto err_out;
 	}
 	}
 
 
-	if (db9_mode[mode].bidirectional && !(pp->modes & PARPORT_MODE_TRISTATE)) {
+	if (db9_mode->bidirectional && !(pp->modes & PARPORT_MODE_TRISTATE)) {
 		printk(KERN_ERR "db9.c: specified parport is not bidirectional\n");
 		printk(KERN_ERR "db9.c: specified parport is not bidirectional\n");
 		err = -EINVAL;
 		err = -EINVAL;
 		goto err_put_pp;
 		goto err_put_pp;