mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 08:01:30 -07:00
Fix use-after-free in fuzzpuzz
When reporting that the game name in a save file isn't recognised, don't include the name from the save file in the error message, partly to avoid the complexity of freeing it properly on two different code paths and partly because including unsanitized data from a fuzzer-supplied save file in the error message just seems dangerous. And properly sanitising it would waste the fuzzer's time exploring the sanitising code. Thanks to Ben Hutchings for reporting the bug.
This commit is contained in:
@ -81,7 +81,7 @@ int main(int argc, char **argv)
|
||||
ourgame = gamelist[i];
|
||||
sfree(gamename);
|
||||
if (ourgame == NULL) {
|
||||
fprintf(stderr, "Game '%s' not recognised\n", gamename);
|
||||
fprintf(stderr, "Game not recognised\n");
|
||||
ret = 1;
|
||||
continue;
|
||||
}
|
||||
|
Reference in New Issue
Block a user