1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-27 13:21:11 +03:00

gzip: Add missing NULL check

CID 1398980

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Andreas Schneider
2019-05-28 08:41:48 +02:00
parent d9f9bee13f
commit a7e17a34ad

View File

@@ -67,6 +67,9 @@ static ssh_buffer gzip_compress(ssh_session session, ssh_buffer source, int leve
int status;
crypto = ssh_packet_get_current_crypto(session, SSH_DIRECTION_OUT);
if (crypto == NULL) {
return NULL;
}
zout = crypto->compress_out_ctx;
if (zout == NULL) {
zout = crypto->compress_out_ctx = initcompress(session, level);