https://gitlab.synchro.net/main/sbbs/-/commit/6bb8e8c6a7e0a62d376587fb
Modified Files:
src/sbbs3/str.cpp
Log Message:
Fix SIF data display: first answer wiped, over-read past short data
sof() cleared answers[0] on entry, a change made in 3688a141dd
(floor-20-knew, 2022-03-03) while fixing CID 33227. answers is the data
being displayed, not an output buffer, so the first byte of every
READ_SIF / new-user SOF display was replaced with a NUL.
The only bounds check was made before each field, so a string field
could still read up to 'max' bytes past the end of a data file shorter
than its SIF template expects. Limit getrec() to the bytes remaining.
Fixes CID 661775
Co-Authored-By: Claude Opus 5.5 <
noreply@anthropic.com>