SSH-01-006: Add missing NULL check in gzip_decompress()

Fixes T193

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
(cherry picked from commit 924dc5aed8)
This commit is contained in:
Andreas Schneider
2019-10-28 14:18:20 +01:00
parent f6c8e87c3e
commit 563e1fc821

View File

@@ -162,6 +162,10 @@ static ssh_buffer gzip_decompress(ssh_session session, ssh_buffer source, size_t
int status;
crypto = ssh_packet_get_current_crypto(session, SSH_DIRECTION_IN);
if (crypto == NULL) {
return NULL;
}
zin = crypto->compress_in_ctx;
if (zin == NULL) {
zin = crypto->compress_in_ctx = initdecompress(session);