simon-git: putty (main): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Thu Nov 21 13:17:46 GMT 2024


TL;DR:
  52b24190 Make the -legacy-foo options not SAVEABLE.
  a71866ae Disable UTF-8 console handling on pre-NT Windows.
  19d479d6 Fix memory leaks in conf_try_set_*.
  41473d91 Fix a memory leak in Windows f_open.
  4e50c860 Stop accidentally sending wchar_t as terminal input!

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:           2024-11-21 13:17:46

commit 52b24190285c79b8534cc8f64e1dc321e3f1768d
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=52b24190285c79b8534cc8f64e1dc321e3f1768d;hp=01c404c03d089edc1a365b29b83115efaebc8211
Author: Simon Tatham <anakin at pobox.com>
Date:   Thu Nov 21 12:39:04 2024 +0000

    Make the -legacy-foo options not SAVEABLE.
    
    They weren't being enacted if you ran psftp without a hostname and
    later issued an 'open' command, because in that code path,
    cmdline_run_saved() was never called. Without SAVEABLE, the options
    are processed immediately instead of being deferred for later.
    
    Also, it's pointless. The purpose of marking command-line options as
    SAVEABLE is so that their processing can be correctly ordered with
    respect to loading a saved session, so that they can reliably override
    settings that the saved session might have defined another way. (E.g.
    "plink -A sessionname": processing those options in strict
    left-to-right order, the saved session's opinion about agent
    forwarding would be used, regardless of the -A option.) So anything
    that's not stored in Conf (and hence the saved session) at all doesn't
    have any reason to be SAVEABLE.
    
    I think I must have put the SAVEABLE in by thoughtless clone-and-hack.

 cmdline.c | 2 --
 1 file changed, 2 deletions(-)

commit a71866aebb402d4f6a1ea64272f5295723e1ffe7
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=a71866aebb402d4f6a1ea64272f5295723e1ffe7;hp=52b24190285c79b8534cc8f64e1dc321e3f1768d
Author: Simon Tatham <anakin at pobox.com>
Date:   Thu Nov 21 12:43:50 2024 +0000

    Disable UTF-8 console handling on pre-NT Windows.
    
    The w32old builds couldn't read a password from the console at all,
    because ReadConsoleW would always return failure.

 windows/console.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

commit 19d479d6844690eae2d40e786ed5c6a88ea180f3
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=19d479d6844690eae2d40e786ed5c6a88ea180f3;hp=a71866aebb402d4f6a1ea64272f5295723e1ffe7
Author: Simon Tatham <anakin at pobox.com>
Date:   Thu Nov 21 12:45:44 2024 +0000

    Fix memory leaks in conf_try_set_*.
    
    Spotted by Coverity: we should check the value_type of the Conf
    setting and return failure _before_ allocating the new conf_entry.

 utils/conf.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

commit 41473d915bb7b183415d51a3a3cc0e0c133a7a9d
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=41473d915bb7b183415d51a3a3cc0e0c133a7a9d;hp=19d479d6844690eae2d40e786ed5c6a88ea180f3
Author: Simon Tatham <anakin at pobox.com>
Date:   Thu Nov 21 12:47:06 2024 +0000

    Fix a memory leak in Windows f_open.
    
    The UCS-2 translation of the access-mode string ("r", "wb" etc) was
    not being freed, because the free call appeared after an unconditional
    return statement.
    
    Spotted by Coverity, although now I wonder why an ordinary compiler
    warning hadn't long since pointed this one out!

 windows/utils/filename.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

commit 4e50c86040ac38325628b826594dc4d00a8f07d3
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=4e50c86040ac38325628b826594dc4d00a8f07d3;hp=41473d915bb7b183415d51a3a3cc0e0c133a7a9d
Author: Simon Tatham <anakin at pobox.com>
Date:   Thu Nov 21 13:10:22 2024 +0000

    Stop accidentally sending wchar_t as terminal input!
    
    When term_input_data_from_charset receives data in a specified
    character set (that isn't a negative number indicating "just send
    binary"), it was translating from that character set into wide-
    character Unicode, but then forgetting to translate back again into
    the terminal's configured character set.
    
    Introduced by the rewrite in commit 4f756d2a4db7678. Affected the
    answerback string sent in response to ^E, and I think potentially some
    paths through term_keyinput too, although I haven't quite worked out
    which ones would have been affected.

 terminal/terminal.c | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)



More information about the tartarus-commits mailing list