1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00
putty-source/utils
Simon Tatham 395c228bee Adopt a new universal implementation of smemclr().
This new implementation uses the same optimisation-barrier technique
that I used in various places in testsc: have a no-op function, and a
volatile function pointer pointing at it, and then call through the
function pointer, so that nothing actually happens (apart from the
physical call and return) but the compiler has to assume that
_anything_ might have happened.

Doing this just after a memset enforces that the compiler can't have
thrown away the memset, because the called function might (for
example) check that all the memory really is zero and abort if not.

I've been turning this over in my mind ever since coming up with the
technique for testsc. I think it's far more robust than the previous
smemclr technique: so much so that I'm switching to using it
_everywhere_, and no longer using platform alternatives like Windows's
SecureZeroMemory().
2021-04-18 08:30:44 +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
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
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
nullstrcmp.c
out_of_memory.c
parse_blocksize.c
prompts.c
ptrlen.c
read_file_into.c
seat_connection_fatal.c
sessprep.c
sk_free_peer_info.c
smemclr.c Adopt a new universal implementation of smemclr(). 2021-04-18 08:30:44 +01:00
smemeq.c
ssh2_pick_fingerprint.c
sshutils.c
strbuf.c
string_length_for_printf.c
stripctrl.c
tree234.c
utils.h
validate_manual_hostkey.c
version.c
wcwidth.c
wildcard.c
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