1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00
putty-source/otherbackends
Simon Tatham 6cf6682c54 Rewrite some manual char-buffer-handling code.
In the course of recent refactorings I noticed a couple of cases where
we were doing old-fashioned preallocation of a char array with some
conservative maximum size, then writing into it via *p++ or similar
and hoping we got the calculation right.

Now we have strbuf and dupcat, so we shouldn't ever have to do that.
Fixed as many cases as I could find by searching for allocations of
the form 'snewn(foo, char)'.

Particularly worth a mention was the Windows GSSAPI setup code, which
was directly using the Win32 Registry API, and looks much more legible
using the windows/utils/registry.c wrappers. (But that was why I had
to enhance them in the previous commit so as to be able to open
registry keys read-only: without that, the open operation would
actually fail on this key, which is not user-writable.)

Also unix/askpass.c, which was doing a careful reallocation of its
buffer to avoid secrets being left behind in the vacated memory -
which is now just a matter of ensuring we called strbuf_new_nm().
2022-09-14 16:10:29 +01:00
..
CMakeLists.txt Move other backends into a subdirectory. 2021-04-22 18:24:15 +01:00
raw.c New plug_closing error type for 'user abort'. 2021-11-06 14:48:26 +00:00
rlogin.c Richer data type for interactive prompt results. 2021-12-28 18:08:31 +00:00
supdup.c Comment typo in supdup.c. 2022-08-03 20:48:46 +01:00
telnet.c Rewrite some manual char-buffer-handling code. 2022-09-14 16:10:29 +01:00
testback.c Resurrect the test backends. 2022-04-02 16:13:27 +01:00