Fixed crash in joystick handling code. Newer 2.6 kernels add an additional 'resolution' field to input_absinfo. Note that we don't use that structure since we want to have enough space for the values even when building with an older kernel.
authorSam Lantinga <slouken@libsdl.org>
Thu, 17 Dec 2009 07:22:48 +0000
changeset 3590493f252a455c
parent 3589 06f0768a904c
child 3591 db4af3cb938e
Fixed crash in joystick handling code. Newer 2.6 kernels add an additional 'resolution' field to input_absinfo. Note that we don't use that structure since we want to have enough space for the values even when building with an older kernel.
src/joystick/linux/SDL_sysjoystick.c
     1.1 --- a/src/joystick/linux/SDL_sysjoystick.c	Thu Dec 17 06:08:20 2009 +0000
     1.2 +++ b/src/joystick/linux/SDL_sysjoystick.c	Thu Dec 17 07:22:48 2009 +0000
     1.3 @@ -701,7 +701,7 @@
     1.4                  continue;
     1.5              }
     1.6              if (test_bit(i, absbit)) {
     1.7 -                int values[5];
     1.8 +                int values[6];
     1.9  
    1.10                  if (ioctl(fd, EVIOCGABS(i), values) < 0)
    1.11                      continue;