aboutsummaryrefslogtreecommitdiff
path: root/bridges.c
diff options
context:
space:
mode:
authorBen Harris <bjh21@bjh21.me.uk>2023-01-12 20:55:56 +0000
committerBen Harris <bjh21@bjh21.me.uk>2023-01-15 16:24:27 +0000
commit21193eaf9308ace41004a19180ff382ec6e8754b (patch)
tree485d428a0f54c74bb4f470fbd6daf7093f9c4f30 /bridges.c
parentb3d4a4197954c21ac78b68c58dff8f84fe743ea2 (diff)
downloadpuzzles-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