зеркало из https://github.com/github/putty.git
Add a missing null pointer check in s_write.
I don't know that this can ever be triggered in the current state of the code, but when I start mucking around with SSH session closing in the near future, it may be handy to have it. [originally from svn r10076]
This commit is contained in:
Родитель
8be6fbaa09
Коммит
b71b443c7c
2
ssh.c
2
ssh.c
|
@ -1762,6 +1762,8 @@ static int s_write(Ssh ssh, void *data, int len)
|
|||
if (ssh->logctx)
|
||||
log_packet(ssh->logctx, PKT_OUTGOING, -1, NULL, data, len,
|
||||
0, NULL, NULL);
|
||||
if (!ssh->s)
|
||||
return 0;
|
||||
return sk_write(ssh->s, (char *)data, len);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче