Bug#679875: ace-of-penguins: Games crash when trying to view help screen

Krzysztof Aleksander Pyrkosz krzpyrkosz at gmail.com
Mon May 2 23:08:41 BST 2022


Package: ace-of-penguins
Followup-For: Bug #679875
X-Debbugs-Cc: krzpyrkosz at gmail.com

Dear Maintainer,

the source of the bug is an out of bounds access in a for loop in lib/help.c:515

    int ts = (thin_space[words[i-1].flags & STYLE_BITS]
              + thin_space[words[i].flags & STYLE_BITS])/2;

Iteration starts from i = 0, accessing words[i-1] causes the crash.
The upper bound is wrong aswell. Iteration should terminate for i < nwords, not i <= nwords.



More information about the Pkg-games-devel mailing list