mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-02 12:02:47 -05:00
Fix stale-pointer bugs in connection-fatal network errors.
I think these began to appear as a consequencce of replacing fatalbox() calls with more sensible error reports: the more specific a direction I send a report in, the greater the annoying possibility of re-entrance when the resulting error handler starts closing stuff.
This commit is contained in:
2
ssh.c
2
ssh.c
@ -7784,6 +7784,8 @@ static int ssh2_try_send(struct ssh_channel *c)
|
||||
ssh2_pkt_addstring_start(pktout);
|
||||
ssh2_pkt_addstring_data(pktout, data, len);
|
||||
ssh2_pkt_send(ssh, pktout);
|
||||
if (!ssh->s) /* a network error might have closed the socket */
|
||||
break;
|
||||
bufchain_consume(&c->v.v2.outbuffer, len);
|
||||
c->v.v2.remwindow -= len;
|
||||
}
|
||||
|
Reference in New Issue
Block a user