[patch] input: sunkbd.c - fix reading beyond end of keycode array [14/14]

Vojtech Pavlik
2003-02-12T10:59:59Z

ChangeSet@1.1017, 2003-02-12 11:09:03+01:00, vojtech@suse.cz
input: sunkbd.c - fix reading beyond end of keycode array.

sunkbd.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)

===================================================================

diff -Nru a/drivers/input/keyboard/sunkbd.c b/drivers/input/keyboard/sunkbd.c
--- a/drivers/input/keyboard/sunkbd.c Wed Feb 12 11:56:22 2003
+++ b/drivers/input/keyboard/sunkbd.c Wed Feb 12 11:56:22 2003
@@ -268,7 +268,7 @@
sprintf(sunkbd->name, "Sun Type %d keyboard", sunkbd->type);

memcpy(sunkbd->keycode, sunkbd_keycode, sizeof(sunkbd->keycode));
- for (i = 0; i < 255; i++)
+ for (i = 0; i < 127; i++)
set_bit(sunkbd->keycode[i], sunkbd->dev.keybit);
clear_bit(0, sunkbd->dev.keybit);