simon-git: puzzles (main): Ben Harris
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Mon Feb 20 14:59:31 GMT 2023
TL;DR:
4e09175 Fix memory leak in midend_game_id_int()
795ccf6 GTK: Free error message if new_window fails
bbe866a Flood: don't read off the end of some parameter strings
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: 2023-02-20 14:59:31
commit 4e09175fdaaffc0483fc9bf767311268794d956c
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=4e09175fdaaffc0483fc9bf767311268794d956c;hp=1235f05af70c3acea7eedb0cbfd726ab4ec357c4
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date: Mon Feb 20 14:50:22 2023 +0000
Fix memory leak in midend_game_id_int()
The "par" string wasn't getting freed on some error paths. Fixed by
freeing it immediately after its last use, which is before any of the
error paths.
midend.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
commit 795ccf60023fd76893345c8ef6cefd535004a240
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=795ccf60023fd76893345c8ef6cefd535004a240;hp=4e09175fdaaffc0483fc9bf767311268794d956c
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date: Mon Feb 20 14:54:17 2023 +0000
GTK: Free error message if new_window fails
This is kind of pointless because it comes just before a return from
main(), but it's pretty harmless and it cheers up AddressSanitizer.
gtk.c | 1 +
1 file changed, 1 insertion(+)
commit bbe866a3819c6a754a5b1d8c5bc5d0701796acfb
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=bbe866a3819c6a754a5b1d8c5bc5d0701796acfb;hp=795ccf60023fd76893345c8ef6cefd535004a240
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date: Mon Feb 20 14:57:31 2023 +0000
Flood: don't read off the end of some parameter strings
This is essentially the same fix as 73c7bc090155ab8c was for Twiddle.
The new code is less clever but more correct (and more obviously
correct). The bug could be demonstrated by using a parameter string
of "c" or "m" with an AddressSanitizer build of Flood.
flood.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
More information about the tartarus-commits
mailing list