diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2019-05-28 08:41:48 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2019-05-28 09:18:52 +0200 |
commit | a7e17a34ad7b29e06120e9abfeb82149c742fcf1 (patch) | |
tree | 48b227cdf5864d5bf279d5fbd68522da14b43448 /src/gzip.c | |
parent | d9f9bee13fce6cc40171e400622a12efbcaccf21 (diff) | |
download | libssh-a7e17a34ad7b29e06120e9abfeb82149c742fcf1.tar.gz libssh-a7e17a34ad7b29e06120e9abfeb82149c742fcf1.tar.xz libssh-a7e17a34ad7b29e06120e9abfeb82149c742fcf1.zip |
gzip: Add missing NULL check
CID 1398980
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src/gzip.c')
-rw-r--r-- | src/gzip.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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); |