VOGONS


Buffer overflow

Topic actions

First post, by MatureTech

User metadata
Rank Newbie
Rank
Newbie

Current SVN, trunk/src/gui/sdl_mapper.cpp, lines 2394 and 2395. button_pressed belongs in the 8 loop. In 0.74, bug exists at lines 2388 and 2389.

Also, +1 to removing the 4-axis limit as discussed here. The 8-way hat on the Logitech Extreme 3D Pro shows up as axes 5 and 6 and I want to use it as the second joystick in Llamatron.

Thanks.

ISA go Bragh™

Reply 1 of 1, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Yes, and in the 8-loop there is a typo where the first stick is initialized twice, leaving the second stick uninitialized. The issues were reported on SourceForge: http://sourceforge.net/p/dosbox/patches/257/

Because the struct is initialized with false and zero values, memset() should work nicely in place of the loops:

memset(&virtual_joysticks,0,sizeof(virtual_joysticks));