simon-git: putty (main): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Fri Apr 7 08:00:48 BST 2023
TL;DR:
775d969c Fix potential corruption when writing help file.
6a27ae77 Remove a completely unused loop in RTF pasting.
Repository: https://git.tartarus.org/simon/putty.git
On the web: https://git.tartarus.org/?p=simon/putty.git
Branch updated: main
Committer: Simon Tatham <anakin at pobox.com>
Date: 2023-04-07 08:00:48
commit 775d969ca86aa9e9d6d51bd0ee88af8b6369942a
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=775d969ca86aa9e9d6d51bd0ee88af8b6369942a;hp=8e7e3c59448013be44b8cba2b7f89a894ee34113
Author: Simon Tatham <anakin at pobox.com>
Date: Fri Apr 7 07:39:49 2023 +0100
Fix potential corruption when writing help file.
When the standalone version of a binary, with its help file included
as a resource, extracts that resource to write it to a disk, it could
have accidentally skipped a byte in the middle if the WriteFile call
in this loop had not managed to write the whole file in one go.
windows/help.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 6a27ae772c6fb27f8ddb2bec508e3e403be2a516
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=6a27ae772c6fb27f8ddb2bec508e3e403be2a516;hp=775d969ca86aa9e9d6d51bd0ee88af8b6369942a
Author: Simon Tatham <anakin at pobox.com>
Date: Fri Apr 7 07:51:17 2023 +0100
Remove a completely unused loop in RTF pasting.
In commit d07d7d66f662b67 I rewrote the code that constructs RTF paste
data so that it uses a strbuf, in place of the previous ad-hoc code
that counted up the lengths of pieces of RTF in advance in order to
realloc the buffer.
But apparently I left in an entire loop whose job was to count up one
of those lengths, failing to notice that it's now completely pointless
because its output value is never needed!
Happily a clang upgrade has just improved the 'variable set but not
used' warning to the point where it can spot that. I expect previously
the variable still counted as 'used' because each increment of it used
the previous value.
windows/window.c | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
More information about the tartarus-commits
mailing list