summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2022-01-17 22:56:04 +0000
committerDamien Miller <djm@mindrot.org>2022-01-18 11:15:23 +1100
commitd1051c0f11a6b749027e26bbeb61b07df4b67e15 (patch)
tree6d2fb97479d3156723da734d708df426fbe1074f
parentd5981b1883746b1ae178a46229c26b53af99e37a (diff)
downloadopenssh-git-d1051c0f11a6b749027e26bbeb61b07df4b67e15.tar.gz
upstream: when decompressing zlib compressed packets, use
Z_SYNC_FLUSH instead of Z_PARTIAL_FLUSH as the latter is not actually specified as a valid mode for inflate(). There should be no practical change in behaviour as the compression side ensures a flush that should make all data available to the receiver in all cases. repoted by lamm AT ibm.com via bz3372; ok markus OpenBSD-Commit-ID: 67cfc1fa8261feae6d2cc0c554711c97867cc81b
-rw-r--r--packet.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/packet.c b/packet.c
index 248fb9bd..d81d01a1 100644
--- a/packet.c
+++ b/packet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: packet.c,v 1.304 2022/01/01 01:55:30 jsg Exp $ */
+/* $OpenBSD: packet.c,v 1.305 2022/01/17 22:56:04 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -794,7 +794,7 @@ uncompress_buffer(struct ssh *ssh, struct sshbuf *in, struct sshbuf *out)
ssh->state->compression_in_stream.avail_out = sizeof(buf);
status = inflate(&ssh->state->compression_in_stream,
- Z_PARTIAL_FLUSH);
+ Z_SYNC_FLUSH);
switch (status) {
case Z_OK:
if ((r = sshbuf_put(out, buf, sizeof(buf) -