Fill: Paint & Radial; bounds check for touched[]

Avoid reading outside of the bounds of the `touched[]` array,
to help prevent crashes.

h/t Miyagi Andel for reporting,
Shin-ichi TOYAMA for pinpointing the issue,
and Pere Pujal i Carabantes for providing a solution

Closes https://sourceforge.net/p/tuxpaint/bugs/269
This commit is contained in:
Bill Kendrick 2022-12-23 00:08:52 -08:00
parent 2c6c50205c
commit c13c6e1dcb
2 changed files with 52 additions and 34 deletions

View file

@ -7,7 +7,7 @@ Various contributors (see below, and AUTHORS.txt)
https://tuxpaint.org/
2022.December.21 (0.9.29)
2022.December.23 (0.9.29)
* Improvements to "Stamp" tool:
-----------------------------
* Stamps may now be rotated.
@ -107,6 +107,13 @@ https://tuxpaint.org/
(Also, some tweaks to the spacing UI)
Bill Kendrick <bill@newbreedsoftware.com>
* Mend crash bug in "Paint" and "Radial Gradient" modes of Fill tool.
Pere Pujal i Carabantes <perepujal@gmail.com>
with Bill Kendrick <bill@newbreedsoftware.com>
Closes https://sourceforge.net/p/tuxpaint/bugs/269
(h/t Miyagi Andel for reporting & Shin-ichi TOYAMA for pinpointing
the issue)
* Ports & Building:
-----------------
* Processed PNG images through `pngout` to increase some compression