simon-git: puzzles (main): Ben Harris

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Sun Oct 16 20:07:39 BST 2022


TL;DR:
  02e5e93 Add more validation to midend deserialisation routine
  1bab1d1 Correct and enable the range check on statepos when loading

Repository:     https://git.tartarus.org/simon/puzzles.git
On the web:     https://git.tartarus.org/?p=simon/puzzles.git
Branch updated: main
Committer:      Ben Harris <bjh21 at bjh21.me.uk>
Date:           2022-10-16 20:07:39

commit 02e5e93046d1ee2ce7acde629a6562db9b36fa5d
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=02e5e93046d1ee2ce7acde629a6562db9b36fa5d;hp=879a6922b0c59108de91f191926d0dde62cd2bd6
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date:   Sun Oct 16 18:31:54 2022 +0100

    Add more validation to midend deserialisation routine
    
    These are all pretty obvious and enforce constraints that would
    otherwise be enforced by segfault.

 midend.c | 45 +++++++++++++++++++++++++++++----------------
 1 file changed, 29 insertions(+), 16 deletions(-)

commit 1bab1d1d2ab472bb8fc7cddfce1d3c37e63a2ed5
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=1bab1d1d2ab472bb8fc7cddfce1d3c37e63a2ed5;hp=02e5e93046d1ee2ce7acde629a6562db9b36fa5d
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date:   Sun Oct 16 19:14:24 2022 +0100

    Correct and enable the range check on statepos when loading
    
    statepos == 0 shouldn't ever occur in a save file because it indicates
    an uninitialised midend.  OTOH statepos == nstates is normal.  Also
    added an equivalent assertion when saving because Simon and I spent
    some time discussing whether it could happen.

 midend.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)



More information about the tartarus-commits mailing list