1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 09:58:01 +00:00

Clear kex_ctx in a new session so we can safely free an ssh session without

one.

[originally from svn r2649]
This commit is contained in:
Ben Harris 2003-01-18 21:56:33 +00:00
parent 3afb0f5da8
commit 35f3ef5cc9

3
ssh.c
View File

@ -824,7 +824,7 @@ static int ssh1_rdpkt(Ssh ssh, unsigned char **data, int *datalen)
st->realcrc = crc32(ssh->pktin.data, st->biglen - 4); st->realcrc = crc32(ssh->pktin.data, st->biglen - 4);
st->gotcrc = GET_32BIT(ssh->pktin.data + st->biglen - 4); st->gotcrc = GET_32BIT(ssh->pktin.data + st->biglen - 4);
if (st->gotcrc != st->realcrc) { if (st->gotcrc != st->realcrc) {
bombout((ssh,"Incorrect CRC received on packet")); bombout((ssh,"Incorrect CRC received on packet: wanted 0x%08x, got 0x%08x", st->realcrc, st->gotcrc));
crReturn(0); crReturn(0);
} }
@ -5903,6 +5903,7 @@ static char *ssh_init(void *frontend_handle, void **backend_handle,
ssh->sccomp = NULL; ssh->sccomp = NULL;
ssh->sc_comp_ctx = NULL; ssh->sc_comp_ctx = NULL;
ssh->kex = NULL; ssh->kex = NULL;
ssh->kex_ctx = NULL;
ssh->hostkey = NULL; ssh->hostkey = NULL;
ssh->exitcode = -1; ssh->exitcode = -1;
ssh->state = SSH_STATE_PREPACKET; ssh->state = SSH_STATE_PREPACKET;