mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-10 18:28:10 +09:00
SSH-01-006: Add missing NULL check for ssh_packet_get_current_crypto()
Fixes T193
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
(cherry picked from commit b55d7f3b73)
This commit is contained in:
@@ -103,6 +103,9 @@ int ssh_packet_decrypt(ssh_session session,
|
|||||||
}
|
}
|
||||||
|
|
||||||
crypto = ssh_packet_get_current_crypto(session, SSH_DIRECTION_IN);
|
crypto = ssh_packet_get_current_crypto(session, SSH_DIRECTION_IN);
|
||||||
|
if (crypto == NULL) {
|
||||||
|
return SSH_ERROR;
|
||||||
|
}
|
||||||
cipher = crypto->in_cipher;
|
cipher = crypto->in_cipher;
|
||||||
|
|
||||||
if (encrypted_size % cipher->blocksize != 0) {
|
if (encrypted_size % cipher->blocksize != 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user