1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-30 13:01:23 +03:00

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

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:22:52 +01:00
parent 69daa602b8
commit 56d571ab81

View File

@@ -2384,6 +2384,9 @@ ssh_string ssh_pki_do_sign_agent(ssh_session session,
int rc; int rc;
crypto = ssh_packet_get_current_crypto(session, SSH_DIRECTION_BOTH); crypto = ssh_packet_get_current_crypto(session, SSH_DIRECTION_BOTH);
if (crypto == NULL) {
return NULL;
}
/* prepend session identifier */ /* prepend session identifier */
session_id = ssh_string_new(crypto->digest_len); session_id = ssh_string_new(crypto->digest_len);