1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-08 08:58:00 +00:00
putty-source/utils
Simon Tatham 65270b56f0 free_prompts: deal with a reference from an Ldisc.
In a GUI app, when interactive userpass input begins, the Ldisc
acquires a reference to a prompts_t. If something bad happens to the
SSH connection (e.g. unexpected server-side closure), then all the SSH
layers will be destroyed, including freeing that prompts_t. So the
Ldisc will have a stale reference to it, which it might potentially
use.

To fix that, I've arranged a back-pointer so that prompts_t itself can
find the Ldisc's reference to it, and NULL it out on free. So now,
whichever of a prompts_t and an Ldisc is freed first, the link between
them should be cleanly broken.

(I'm not 100% sure this is absolutely necessary, in the sense of
whether a sequence of events can _actually_ happen that causes a stale
pointer dereference. But I don't want to take the chance!)
2021-09-16 13:55:10 +01:00
..
base64_decode_atom.c
base64_encode_atom.c
bufchain.c
buildinfo.c Adopt a new universal implementation of smemclr(). 2021-04-18 08:30:44 +01:00
burnstr.c
chomp.c
CMakeLists.txt Allow new_connection to take an optional Seat. (NFC) 2021-09-13 17:24:47 +01:00
conf_dest.c
conf_launchable.c
conf.c
ctrlparse.c
debug.c
dupcat.c
dupprintf.c
dupstr.c
encode_utf8.c
fgetline.c
host_strchr_internal.c Build various unit-test main() programs in utils. 2021-04-18 08:30:44 +01:00
host_strchr.c
host_strcspn.c
host_strduptrim.c
host_strrchr.c
ltime.c
marshal.c
memory.c
memxor.c
miscucs.c
null_lp.c
nullseat.c Complete rework of terminal userpass input system. 2021-09-14 13:19:33 +01:00
nullstrcmp.c
out_of_memory.c
parse_blocksize.c
prompts.c free_prompts: deal with a reference from an Ldisc. 2021-09-16 13:55:10 +01:00
ptrlen.c
read_file_into.c
seat_connection_fatal.c
sessprep.c
sk_free_peer_info.c
smemclr.c Fix typo in comment. 2021-04-19 17:14:01 +01:00
smemeq.c
ssh2_pick_fingerprint.c
sshutils.c Move the SSH implementation into its own subdirectory. 2021-04-22 18:09:13 +01:00
strbuf.c
string_length_for_printf.c
stripctrl.c
tempseat.c Complete rework of terminal userpass input system. 2021-09-14 13:19:33 +01:00
tree234.c Build various unit-test main() programs in utils. 2021-04-18 08:30:44 +01:00
utils.h
validate_manual_hostkey.c
version.c
wcwidth.c
wildcard.c Build various unit-test main() programs in utils. 2021-04-18 08:30:44 +01:00
write_c_string_literal.c
x11_dehexify.c Break up x11fwd.c. 2021-04-18 08:18:27 +01:00
x11_identify_auth_proto.c Break up x11fwd.c. 2021-04-18 08:18:27 +01:00
x11_make_greeting.c Break up x11fwd.c. 2021-04-18 08:18:27 +01:00
x11_parse_ip.c Break up x11fwd.c. 2021-04-18 08:18:27 +01:00
x11authfile.c Break up x11fwd.c. 2021-04-18 08:18:27 +01:00
x11authnames.c Break up x11fwd.c. 2021-04-18 08:18:27 +01:00