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>
This commit is contained in:
Andreas Schneider
2019-10-28 14:18:20 +01:00
parent 6b8ab4bcd2
commit 924dc5aed8

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);