When attempting to use a joystick in an SDL application (such as dosbox), the program crashes. This seems to be due to an incorrect patch that leaves the "struct report" pointer uninitialized.
Fix: Correctly initialize the "rep" variable.
Patch attached with submission follows:
How-To-Repeat: Build and install dosbox on 8-current, attempt to use a (usb) joystick.
Fix synopsis and assign.
I can't find any notable difference between your patch and the already
existing one within the ports. Did you send the wrong file around or am
I missing something?
Thanks and regards
On Tue, 4 Aug 2009, Marcus von Appen wrote:
> I can't find any notable difference between your patch and the already
> existing one within the ports. Did you send the wrong file around or am
> I missing something?
> Thanks and regards
The line with the rep assignment:
rep = &hw->inreport;
Needs to be before the #if conditionals, otherwise you'll dereference an
uninitialized pointer. The patch in ports CVS has the assignment after the
ifdef, instead of before.
mva 2009-08-08 08:49:29 UTC
FreeBSD ports repository
Fix crashes when joysticks are attached on -CURRENT.
Reviewed by: Wes Morgan <firstname.lastname@example.org>
Approved by: miwi (mentor)
Revision Changes Path
1.120 +1 -1 ports/devel/sdl12/Makefile
1.2 +3 -3 ports/devel/sdl12/files/patch-src_joystick_bsd_SDL_sysjoystick.c
email@example.com mailing list
To unsubscribe, send any mail to "firstname.lastname@example.org"