Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 132607 - jstest from games-util/joystick segfault
Summary: jstest from games-util/joystick segfault
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-07 11:50 UTC by Matt Anderson
Modified: 2006-07-30 21:51 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch to fix segfault (joystick-20050720-fix-segfault-on-undefined-axis-buttins.patch,1.47 KB, patch)
2006-05-07 11:53 UTC, Matt Anderson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Anderson 2006-05-07 11:50:35 UTC
The jstest utility will segfault when attempting to retrieve joystick button mappings from the js interface when they have not been previously defined, which is probably the case for just about anyone calling jstest. This is due to not checking the result of two ioctl calls and using the result to index into a char *[] array of button/axis names.
Comment 1 Matt Anderson 2006-05-07 11:53:22 UTC
Created attachment 86386 [details, diff]
patch to fix segfault

my proposed patch to fix this segfault. I can also confirm this works well on x86_64 (~amd64)
Comment 2 Ken Werner 2006-07-23 02:36:53 UTC
the patch works fine here my on x86 box. :)
Comment 3 SpanKY gentoo-dev 2006-07-30 21:51:34 UTC
thanks, patch added to joystick-20060731