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 in ssh_pki_do_sign_agent()
Fixes T193
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
(cherry picked from commit 56d571ab81)
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