shithub: puzzles

Download patch

ref: 32c487ba577e7da84d32f7e67d98e7e72fd5da70
parent: 1a48d76fcc9d45035641b7a861e5659da53ed63d
author: Ben Harris <[email protected]>
date: Wed Jan 11 05:14:52 EST 2023

Add a dictionary for AFL++

It consists of two parts.  One is the list of all record types used by
the serialiser, to make it easy for AFL++ to find them.  The other is
the "interesting" integers used by AFL++ converted to ASCII decimal
form because Puzzles save files are coded in decimal and this will
help AFL++ to guess good values.  I hope.

--- /dev/null
+++ b/fuzzpuzz.dict
@@ -1,0 +1,51 @@
+# AFL dictionary to help with fuzzing the Puzzles save-file loader.
+
+# All the keywords in their canonical form.
+
+keyword="SAVEFILE:"
+keyword="VERSION :"
+keyword="GAME    :"
+keyword="PARAMS  :"
+keyword="CPARAMS :"
+keyword="HEXSEED :"
+keyword="SEED    :"
+keyword="DESC    :"
+keyword="PRIVDESC:"
+keyword="AUXINFO :"
+keyword="UI      :"
+keyword="TIME    :"
+keyword="NSTATES :"
+keyword="STATEPOS:"
+keyword="MOVE    :"
+keyword="SOLVE   :"
+keyword="RESTART :"
+
+# Interesting integers from AFL++ "include/config.h" in decimal form.
+
+interesting_8="-128"
+interesting_8="-1"
+interesting_8="0"
+interesting_8="1"
+interesting_8="16"
+interesting_8="32"
+interesting_8="64"
+interesting_8="100"
+interesting_8="127"
+interesting_16="-32768"
+interesting_16="-129"
+interesting_16="128"
+interesting_16="255"
+interesting_16="256"
+interesting_16="512"
+interesting_16="1000"
+interesting_16="1024"
+interesting_16="4096"
+interesting_16="32767"
+interesting_32="-2147483648"
+interesting_32"-100663046"
+interesting_32"-32769"
+interesting_32"32768"
+interesting_32"65535"
+interesting_32"65536"
+interesting_32"100663045"
+interesting_32"2147483647"