diff options
| author | Ben Harris <bjh21@bjh21.me.uk> | 2023-02-12 23:04:12 +0000 |
|---|---|---|
| committer | Ben Harris <bjh21@bjh21.me.uk> | 2023-02-13 21:23:58 +0000 |
| commit | c3a5a7842eb6c41fb75a8a110a3f2cbc1c8fc5d9 (patch) | |
| tree | 4d0ba1b4efe8bf4cddaf0ae8efb473e3e4c35f5a /flood.c | |
| parent | ffe2fa169f9fdc411d00e1c75cf3cdc5f3099727 (diff) | |
| download | puzzles-c3a5a7842eb6c41fb75a8a110a3f2cbc1c8fc5d9.zip puzzles-c3a5a7842eb6c41fb75a8a110a3f2cbc1c8fc5d9.tar.gz puzzles-c3a5a7842eb6c41fb75a8a110a3f2cbc1c8fc5d9.tar.bz2 puzzles-c3a5a7842eb6c41fb75a8a110a3f2cbc1c8fc5d9.tar.xz | |
Validate that save file values are ASCII (mostly)
Apart from "SEED" records, all values in save files generated by Puzzles
should be printable ASCII. This is enforced by assertion in the saving
code. However, if a save file with non-ASCII move strings (for
instance) manages to get loaded then these non-ASCII values can cause an
assertion failure on saving. Instead, the loading code now checks
values for ASCIIness.
This will not only avoid problems when re-saving files, but will also
defend the various internal parsers from at least some evil strings. It
shouldn't invalidate any save files actually generated by Puzzles, but
it will sadly invalidate some of my fuzzing corpus.
Diffstat (limited to 'flood.c')
0 files changed, 0 insertions, 0 deletions