Skip to content

Commit

Permalink
Input: adbhid - fix OOPS introduced by dynalloc conversion
Browse files Browse the repository at this point in the history
The problem is that adbhid[]->input is NULL, so the kernel oopses with
a null pointer dereference as soon as a key is pressed.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
  • Loading branch information
Paul Mackerras authored and Dmitry Torokhov committed Oct 31, 2005
1 parent 76440d5 commit eb16292
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/macintosh/adbhid.c
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,7 @@ adbhid_input_register(int id, int default_id, int original_handler_id,

sprintf(hid->phys, "adb%d:%d.%02x/input", id, default_id, original_handler_id);

hid->input = input_dev;
hid->id = default_id;
hid->original_handler_id = original_handler_id;
hid->current_handler_id = current_handler_id;
Expand Down

0 comments on commit eb16292

Please sign in to comment.