diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2019-05-28 08:33:22 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2019-05-28 09:18:51 +0200 |
commit | 18a89c6ec2f5eaace644ff9cd5c663203b10d970 (patch) | |
tree | 1969c5543ec7cf397d3e105d2488728837d9a02d /src/pki.c | |
parent | cb502a4a6d3f86b656bb5ebc0ae08e5e2f3fc48e (diff) | |
download | libssh-18a89c6ec2f5eaace644ff9cd5c663203b10d970.tar.gz libssh-18a89c6ec2f5eaace644ff9cd5c663203b10d970.tar.xz libssh-18a89c6ec2f5eaace644ff9cd5c663203b10d970.zip |
pki: Avoid a null pointer derefrence
CID 1401434
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src/pki.c')
-rw-r--r-- | src/pki.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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", |