From: simon Date: Sat, 30 Jun 2007 18:17:12 +0000 (+0000) Subject: Tong Ho points out a missing ssh_pkt_ensure(). X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/commitdiff_plain/48406e6b01ff451976b1ef042b723c117e6c40f2 Tong Ho points out a missing ssh_pkt_ensure(). git-svn-id: svn://svn.tartarus.org/sgt/putty@7626 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/ssh.c b/ssh.c index 21fcd2d9..809f4af4 100644 --- a/ssh.c +++ b/ssh.c @@ -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;