mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-25 09:12:24 +00:00
Fix an intermittent segfault that prevented the new Zlib compression
from being very useful. (Thanks to Minefield for catching it.) [originally from svn r820]
This commit is contained in:
parent
ddd12b3e6c
commit
c34ff1bcbf
1
ssh.c
1
ssh.c
@ -410,6 +410,7 @@ next_packet:
|
|||||||
if (pktin.maxlen < st->pad + decomplen) {
|
if (pktin.maxlen < st->pad + decomplen) {
|
||||||
pktin.maxlen = st->pad + decomplen;
|
pktin.maxlen = st->pad + decomplen;
|
||||||
pktin.data = srealloc(pktin.data, pktin.maxlen+APIEXTRA);
|
pktin.data = srealloc(pktin.data, pktin.maxlen+APIEXTRA);
|
||||||
|
pktin.body = pktin.data + st->pad + 1;
|
||||||
if (!pktin.data)
|
if (!pktin.data)
|
||||||
fatalbox("Out of memory");
|
fatalbox("Out of memory");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user