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:
@@ -67,6 +67,9 @@ static ssh_buffer gzip_compress(ssh_session session, ssh_buffer source, int leve
|
|||||||
int status;
|
int status;
|
||||||
|
|
||||||
crypto = ssh_packet_get_current_crypto(session, SSH_DIRECTION_OUT);
|
crypto = ssh_packet_get_current_crypto(session, SSH_DIRECTION_OUT);
|
||||||
|
if (crypto == NULL) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
zout = crypto->compress_out_ctx;
|
zout = crypto->compress_out_ctx;
|
||||||
if (zout == NULL) {
|
if (zout == NULL) {
|
||||||
zout = crypto->compress_out_ctx = initcompress(session, level);
|
zout = crypto->compress_out_ctx = initcompress(session, level);
|
||||||
|
|||||||
Reference in New Issue
Block a user