зеркало из https://github.com/github/putty.git
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:
Родитель
0212b9e5e5
Коммит
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_stdout_unthrottle(ssh->cl, bufsize);
|
||||
if (ssh->cl)
|
||||
ssh_stdout_unthrottle(ssh->cl, bufsize);
|
||||
}
|
||||
|
||||
static bool ssh_connected(Backend *be)
|
||||
|
|
Загрузка…
Ссылка в новой задаче