mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 09:58:01 +00:00
Fix null dereference in ssh_unthrottle.
The backend_unthrottle function gets called when the backlog on stdout clears, and it's possible for that to happen _after_ the SSH backend has terminated the connection and freed all its protocol modules (e.g. if a protocol error occurred on the network while data was still waiting to be written to stdout). So ssh_unthrottle should check that ssh->cl still exists before calling any method of it.
This commit is contained in:
parent
0212b9e5e5
commit
a5911f76d0
3
ssh.c
3
ssh.c
@ -1013,7 +1013,8 @@ static void ssh_unthrottle(Backend *be, int bufsize)
|
|||||||
{
|
{
|
||||||
Ssh *ssh = container_of(be, Ssh, backend);
|
Ssh *ssh = container_of(be, Ssh, backend);
|
||||||
|
|
||||||
ssh_stdout_unthrottle(ssh->cl, bufsize);
|
if (ssh->cl)
|
||||||
|
ssh_stdout_unthrottle(ssh->cl, bufsize);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool ssh_connected(Backend *be)
|
static bool ssh_connected(Backend *be)
|
||||||
|
Loading…
Reference in New Issue
Block a user