Skip to content

Commit

Permalink
Input: gunze - fix out-of-bound array access reported by Adrian Bunk.
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
  • Loading branch information
Dmitry Torokhov committed May 28, 2005
1 parent f24949e commit a07461e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/input/touchscreen/gunze.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ static void gunze_process_packet(struct gunze* gunze, struct pt_regs *regs)

if (gunze->idx != GUNZE_MAX_LENGTH || gunze->data[5] != ',' ||
(gunze->data[0] != 'T' && gunze->data[0] != 'R')) {
gunze->data[10] = 0;
printk(KERN_WARNING "gunze.c: bad packet: >%s<\n", gunze->data);
printk(KERN_WARNING "gunze.c: bad packet: >%.*s<\n", GUNZE_MAX_LENGTH, gunze->data);
return;
}

Expand Down

0 comments on commit a07461e

Please sign in to comment.