From 03c7c4a351712492969bcc6ca40ca421c8dfe8bc Mon Sep 17 00:00:00 2001 From: Zenju Date: Thu, 6 Feb 2020 00:02:56 +0100 Subject: [PATCH] transport.c: Fix crash with delayed compression (#443) Files: transport.c Notes: Fixes crash with delayed compression option using Bitvise server. Contributor: Zenju --- src/transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/transport.c b/src/transport.c index 45e445c..96fca6b 100644 --- a/src/transport.c +++ b/src/transport.c @@ -765,7 +765,7 @@ int _libssh2_transport_send(LIBSSH2_SESSION *session, ((session->state & LIBSSH2_STATE_AUTHENTICATED) || session->local.comp->use_in_auth); - if(encrypted && compressed) { + if(encrypted && compressed && session->local.comp_abstract) { /* the idea here is that these function must fail if the output gets larger than what fits in the assigned buffer so thus they don't check the input size as we don't know how much it compresses */