https://gitlab.synchro.net/main/sbbs/-/commit/e4d6c705328c0cc1c7b5f486
Modified Files:
src/doors/syncduke/syncduke_io.c
Log Message:
syncduke: bound the sixel encode to its buffer (fix full-res co-op SIGSEGV)
The full-res sixel opt-in (5cbc69c24) encodes sxh=sdh without the half-res /2, so
on a large canvas (sdw at the 1024 width cap, sdh ~691 with the aspect/stretch fit)
sxw*sxh exceeded the fixed syncduke_scaled[1024*640] buffer and overran into the
adjacent globals -- g_out got clobbered with palette bytes, and the next out_put
memcpy faulted (SIGSEGV in syncduke_present, seen at co-op level entry). Root-caused
from the core: &g_out sits 48 bytes past the buffer end.
Hard-bound the encoded area to the buffer (sxw*sxh <= OUT_W_MAX*OUT_H_MAX) so it can
never overrun again, and raise OUT_H_MAX 640->768 so a full-res encode on a maxed
window isn't needlessly shrunk by that clamp.
Co-Authored-By: Claude Opus 4.8 <
[email protected]>
--- SBBSecho 3.37-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)