simon-git: putty (main): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Sun Mar 5 13:21:55 GMT 2023
TL;DR:
a76109c5 Add some missing casts in ctype functions.
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-03-05 13:21:55
commit a76109c586944d9ace03ca6a54b7f8173f6c0deb
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=a76109c586944d9ace03ca6a54b7f8173f6c0deb;hp=259de04636b352573c5bb05fe731fe47aa09355e
Author: Simon Tatham <anakin at pobox.com>
Date: Sun Mar 5 13:15:57 2023 +0000
Add some missing casts in ctype functions.
I thought I'd found all of these before, but perhaps a few managed to
slip in since I last looked. The character argument to the <ctype.h>
functions must have the value of an unsigned char or EOF; passing an
ordinary char (unless you know char is unsigned on every platform the
code will ever go near) risks mistaking '\xFF' for EOF, and causing
outright undefined behaviour on byte values in the range 80-FE. Never
do it.
ssh/sesschan.c | 3 ++-
utils/validate_manual_hostkey.c | 2 +-
windows/pageant.c | 2 +-
windows/unicode.c | 10 ++++++----
windows/utils/split_into_argv.c | 6 +++---
windows/window.c | 2 +-
6 files changed, 14 insertions(+), 11 deletions(-)
More information about the tartarus-commits
mailing list