mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-02-03 21:52:24 +00:00
Tong Ho points out a missing ssh_pkt_ensure().
[originally from svn r7626]
This commit is contained in:
parent
c2bb01fa93
commit
fd26b64c74
1
ssh.c
1
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,
|
zlib_compress_block(ssh->cs_comp_ctx,
|
||||||
pkt->data + 12, pkt->length - 12,
|
pkt->data + 12, pkt->length - 12,
|
||||||
&compblk, &complen);
|
&compblk, &complen);
|
||||||
|
ssh_pkt_ensure(pkt, complen + 2); /* just in case it's got bigger */
|
||||||
memcpy(pkt->data + 12, compblk, complen);
|
memcpy(pkt->data + 12, compblk, complen);
|
||||||
sfree(compblk);
|
sfree(compblk);
|
||||||
pkt->length = complen + 12;
|
pkt->length = complen + 12;
|
||||||
|
Loading…
Reference in New Issue
Block a user