mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 09:58:01 +00:00
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:
parent
8be6fbaa09
commit
b71b443c7c
2
ssh.c
2
ssh.c
@ -1762,6 +1762,8 @@ static int s_write(Ssh ssh, void *data, int len)
|
|||||||
if (ssh->logctx)
|
if (ssh->logctx)
|
||||||
log_packet(ssh->logctx, PKT_OUTGOING, -1, NULL, data, len,
|
log_packet(ssh->logctx, PKT_OUTGOING, -1, NULL, data, len,
|
||||||
0, NULL, NULL);
|
0, NULL, NULL);
|
||||||
|
if (!ssh->s)
|
||||||
|
return 0;
|
||||||
return sk_write(ssh->s, (char *)data, len);
|
return sk_write(ssh->s, (char *)data, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user