chiark / gitweb /
input_id: Avoid memory overflow with too long capability masks
authorMartin Pitt <martin.pitt@ubuntu.com>
Fri, 18 Mar 2011 12:56:32 +0000 (13:56 +0100)
committerMartin Pitt <martin.pitt@ubuntu.com>
Fri, 18 Mar 2011 12:56:32 +0000 (13:56 +0100)
commit88149f668ea7ac23c61f6d1982db4f4517da763c
tree0b0433029809ee5ea21ede7ba5f5e51ea16bbea5
parent941c40bdc47d1fdee651558dd0e162cd8d674fab
input_id: Avoid memory overflow with too long capability masks

Joey Lee <jlee@novell.com> reported a problem on an MSI laptop which reports a
too long capabilities/key:

E: EV==3
E: KEY==180000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

This is longer than KEY_MAX and thus caused a memory overflow. Guard against
this now and just ignore the excess blocks.
extras/input_id/input_id.c