summaryrefslogtreecommitdiff
path: root/tests/ecm016_only.epd
diff options
context:
space:
mode:
authorScott Gasch <[email protected]>2026-10-15 16:26:43 -0700
committerScott Gasch <[email protected]>2026-10-15 16:26:43 -0700
commitc179ae5ad9f1a0efb68904033621705fd060aea4 (patch)
tree2f0639b4699a7825b6983f27518497d388eb0e2d /tests/ecm016_only.epd
parent1ea81bae240912efb8cebabae35fe58bc5d12afb (diff)
Fix overlapping-buffer sprintf/snprintf bugs in fen.c and gamelist.c
Both FenFromPosition and the status-line builder in gamelist.c were reading and writing the same buffer within a single sprintf/snprintf call (e.g. sprintf(pHeap, "%s...", pHeap, ...)) -- undefined behavior per the C standard since the source and destination overlap, caught by valgrind as uninitialised-value reads even though no DEBUG ASSERT ever tripped. Fixed by building each piece into a separate buffer (or appending via snprintf/strncat into the already-terminated prefix) instead of re-reading the destination as a source argument. debug_smoke_test.sh: added a valgrind pass over the same sampled smoke-test positions, since this class of bug produces no ASSERT failure and was otherwise invisible to the existing smoke test. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Diffstat (limited to 'tests/ecm016_only.epd')
0 files changed, 0 insertions, 0 deletions