Check touch record bounds before access
Check touch record bounds before access

We guess ten simultaneous touches if the device does not tell us. The
Linux drivers for the Apple multitouch trackpads do not tell the number
of simultaneous touches, but they can do more than ten. When this
occurs, the array index into the touch records will be invalid. We must
not process the touch or else we will segfault.

Signed-off-by: Chase Douglas <69e02ec421aa70a149511825d897f2549ceee9a2@canonical.com>
Reviewed-by: Peter Hutterer <b9c50af7afa7642f6f854434cda9ffe54ece8b85@who-t.net>
Signed-off-by: Peter Hutterer <b9c50af7afa7642f6f854434cda9ffe54ece8b85@who-t.net>

mmonaco/xf86-input-synaptics,quadpixels/three-finger-dragging,corcoran/xserver-xorg-input-synaptics,philipn/xserver-xorg-input-synaptics,felipejfc/xserver-xorg-input-synaptics,felipejfc/xserver-xorg-input-synaptics,jiixyj/xf86-input-synaptics,philipn/xserver-xorg-input-synaptics,mortehu/xf86-input-synaptics,gdestuynder/xf86-input-synaptics,gdestuynder/xf86-input-synaptics,Lyude/xf86-input-synaptics,ssaavedra/xf86-input-synaptics,mortehu/xf86-input-synaptics,quadpixels/three-finger-dragging,nanderson94/xf86-input-synaptics,jiixyj/xf86-input-synaptics,nanderson94/xf86-input-synaptics,corcoran/xserver-xorg-input-synaptics,ssaavedra/xf86-input-synaptics,RsrchBoy/xserver-xorg-input-synaptics,sencer/synaptics,felipejfc/xserver-xorg-input-synaptics,RsrchBoy/xserver-xorg-input-synaptics,eyko/xf86-input-synaptics,eyko/xf86-input-synaptics,philipn/xserver-xorg-input-synaptics,mmonaco/xf86-input-synaptics,Lyude/xf86-input-synaptics,sencer/synaptics