From 697e03662975d71e461c2acd4ba66528808acbeb Mon Sep 17 00:00:00 2001 From: djm Date: Mon, 17 Jan 2022 22:56:04 +0000 Subject: [PATCH] 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 --- usr.bin/ssh/packet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/ssh/packet.c b/usr.bin/ssh/packet.c index 3af35f0cc58..fa66b6dd426 100644 --- a/usr.bin/ssh/packet.c +++ b/usr.bin/ssh/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 * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -774,7 +774,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) - -- 2.20.1