mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-22 14:39:24 -05:00
Fix a crash when connection-sharing during userauth.
If a sharing downstream disconnected while we were still in userauth (probably by deliberate user action, since such a downstream would have just been sitting there waiting for upstream to be ready for it) then we could crash by attempting to count234(ssh->channels) before the ssh->channels tree had been set up in the first place. A simple null-pointer check fixes it. Thanks to Antti Seppanen for the report.
This commit is contained in:
parent
06946b4d4b
commit
31ff9e0f96
2
ssh.c
2
ssh.c
@ -7613,7 +7613,7 @@ static void ssh_check_termination(Ssh ssh)
|
|||||||
{
|
{
|
||||||
if (ssh->version == 2 &&
|
if (ssh->version == 2 &&
|
||||||
!conf_get_int(ssh->conf, CONF_ssh_no_shell) &&
|
!conf_get_int(ssh->conf, CONF_ssh_no_shell) &&
|
||||||
count234(ssh->channels) == 0 &&
|
(ssh->channels && count234(ssh->channels) == 0) &&
|
||||||
!(ssh->connshare && share_ndownstreams(ssh->connshare) > 0)) {
|
!(ssh->connshare && share_ndownstreams(ssh->connshare) > 0)) {
|
||||||
/*
|
/*
|
||||||
* We used to send SSH_MSG_DISCONNECT here, because I'd
|
* We used to send SSH_MSG_DISCONNECT here, because I'd
|
||||||
|
Loading…
x
Reference in New Issue
Block a user