mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-08-08 19:02:06 +03:00
pki: Avoid a null pointer derefrence
CID 1401434 Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@@ -2152,13 +2152,14 @@ int ssh_pki_signature_verify(ssh_session session,
|
||||
size_t input_len)
|
||||
{
|
||||
int rc;
|
||||
enum ssh_keytypes_e key_type = ssh_key_type_plain(key->type);
|
||||
enum ssh_keytypes_e key_type;
|
||||
|
||||
if (session == NULL || sig == NULL || key == NULL || input == NULL) {
|
||||
SSH_LOG(SSH_LOG_TRACE, "Bad parameter provided to "
|
||||
"ssh_pki_signature_verify()");
|
||||
return SSH_ERROR;
|
||||
}
|
||||
key_type = ssh_key_type_plain(key->type);
|
||||
|
||||
SSH_LOG(SSH_LOG_FUNCTIONS,
|
||||
"Going to verify a %s type signature",
|
||||
|
Reference in New Issue
Block a user