Bug#987333: jumpnbump crashes on systems with unsigned char.

peter green plugwash at p10link.net
Wed Apr 21 23:52:23 BST 2021


Package: jumpnbump
Severity: important

A raspbian user reported that jumpnbump "crashes while jumping", but only
if sound was enabled. The issue was also reported by a ubuntu powerpc user.
(back when ubuntu still supported traditional powerpc)

https://bugs.launchpad.net/ubuntu/+source/jumpnbump/+bug/722370

https://bugs.launchpad.net/raspbian/+bug/1639586

Neither of the original reporters tracked down this issue, but
another raspbian user was able to track it down to a char signedness issue
and has posted a fix upstream at

https://gitlab.com/LibreGames/jumpnbump/-/merge_requests/33/diffs

In the C standard, the signedness of type "char" is implementation defined.
In practice it varies between architectures. on x86* it is signed, but on
arm* and powerpc* it is unsigned.

The result is that when dj_play_sfx is called with the "channel" parameter
set to -1 on an architecture with unsigned char it instead gets interpreted
as 255 resulting in an overflow.

I have not personally tested this issue but I intend to do so soon.

If I get no response to this bug and I get time to test out the patch
I will likely upload a NMU in a week or so.



More information about the Pkg-games-devel mailing list