1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-25 01:02:24 +00:00

Tong Ho points out a missing ssh_pkt_ensure().

[originally from svn r7626]
This commit is contained in:
Simon Tatham 2007-06-30 18:17:12 +00:00
parent c2bb01fa93
commit fd26b64c74

1
ssh.c
View File

@ -1424,6 +1424,7 @@ static int s_wrpkt_prepare(Ssh ssh, struct Packet *pkt, int *offset_p)
zlib_compress_block(ssh->cs_comp_ctx,
pkt->data + 12, pkt->length - 12,
&compblk, &complen);
ssh_pkt_ensure(pkt, complen + 2); /* just in case it's got bigger */
memcpy(pkt->data + 12, compblk, complen);
sfree(compblk);
pkt->length = complen + 12;