diff options
| author | Ben Harris <bjh21@bjh21.me.uk> | 2023-01-12 20:55:56 +0000 |
|---|---|---|
| committer | Ben Harris <bjh21@bjh21.me.uk> | 2023-01-15 16:24:27 +0000 |
| commit | 21193eaf9308ace41004a19180ff382ec6e8754b (patch) | |
| tree | 485d428a0f54c74bb4f470fbd6daf7093f9c4f30 /bridges.c | |
| parent | b3d4a4197954c21ac78b68c58dff8f84fe743ea2 (diff) | |
| download | puzzles-21193eaf9308ace41004a19180ff382ec6e8754b.zip puzzles-21193eaf9308ace41004a19180ff382ec6e8754b.tar.gz puzzles-21193eaf9308ace41004a19180ff382ec6e8754b.tar.bz2 puzzles-21193eaf9308ace41004a19180ff382ec6e8754b.tar.xz | |
Palisade: forbid moves that remove grid edges
Without this check, a corrupt save file can include a move that
removes an edge of the grid, and then is_solved() walks off the edge
of the grid causing a buffer over- or under-run.
To demonstrate the bug, load this save file in a build with
AddressSanitizer:
SAVEFILE:41:Simon Tatham's Portable Puzzle Collection
VERSION :1:1
GAME :8:Palisade
PARAMS :5:5x5n5
CPARAMS :5:5x5n5
DESC :0:
NSTATES :1:2
STATEPOS:1:2
MOVE :6:F0,0,1
Diffstat (limited to 'bridges.c')
0 files changed, 0 insertions, 0 deletions