simon-git: putty (main): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Wed Dec 21 15:22:44 GMT 2022


TL;DR:
  5ade8c00 ldisc: fix unwanted double-action of ^U.
  9f2e1e6e Prevent sending double-EOF in raw backend.

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:           2022-12-21 15:22:44

commit 5ade8c00479520031b6a507e4db088fca7d82893
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=5ade8c00479520031b6a507e4db088fca7d82893;hp=95b926865a065e02b294b40ab899c8e921d87227
Author: Simon Tatham <anakin at pobox.com>
Date:   Wed Dec 21 15:05:04 2022 +0000

    ldisc: fix unwanted double-action of ^U.
    
    In ldisc's line editing mode, pressing ^U is supposed to erase the
    current unsent line rather than inserting a literal ^U into the
    buffer. In fact, when using a non-Telnet backend, it erases the
    line *and* inserts ^U into the buffer!
    
    This happens because it shares a case handler with three other
    disruptive control characters (^C, ^\, ^Z), which all also clear the
    line-editing buffer before doing their various actions. But in
    non-Telnet mode, their actions become literal insertion of themselves,
    so the combined effect is to erase the line and them self-insert.
    
    I'm not 100% convinced that was what I actually meant to do with those
    characters. But it _certainly_ wasn't what I meant to do with ^U, so
    that one at least I should fix right now!

 ldisc.c | 2 ++
 1 file changed, 2 insertions(+)

commit 9f2e1e6e03043f551b1a449991ea45d954204808
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=9f2e1e6e03043f551b1a449991ea45d954204808;hp=5ade8c00479520031b6a507e4db088fca7d82893
Author: Simon Tatham <anakin at pobox.com>
Date:   Wed Dec 21 15:13:46 2022 +0000

    Prevent sending double-EOF in raw backend.
    
    You can't call sk_write_eof() twice on the same socket, because the
    second one will fail an assertion. Instead, you're supposed to know
    you've already sent EOF, and not try to send it again.
    
    The call to sk_write_eof() in raw_special (triggered by pressing ^D in
    GUI PuTTY, for example) sets the flag raw->sent_socket_eof in an
    attempt to prevent this. But it doesn't _check_ that flag, so a second
    press of ^D can reach that assertion failure.

 otherbackends/raw.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)



More information about the tartarus-commits mailing list