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:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user