sezero / quakespasm

QuakeSpasm -- A modern, cross-platform Quake game engine based on FitzQuake.
https://sourceforge.net/projects/quakespasm/
GNU General Public License v2.0
227 stars 96 forks source link

bad loop #92

Open Shpoike opened 8 months ago

Shpoike commented 8 months ago

https://github.com/sezero/quakespasm/blob/master/Quake/r_world.c#L131 by pre-skipping leaf 0 (as required by pvs), that array reads 1 leaf and 1 pvsbit beyond the end of their respective arrays, which could result in bad reads or even writes.

sezero commented 8 months ago

Do you have a patch?

CC: @andrei-drexler, @ericwa