aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2019-01-26 14:19:57 +0100
committerAndreas Schneider <asn@cryptomilk.org>2019-01-26 14:21:26 +0100
commitd41042f92d17d8a0ae6ad3b79ea3f8f8ff791cfc (patch)
tree351a941afb5fd3c19d4ea0fb7cc07791800156b5
parent9b2eefe62c03b85ec5ec2e19a894e3e9b1640be2 (diff)
downloadlibssh-d41042f92d17d8a0ae6ad3b79ea3f8f8ff791cfc.tar.gz
libssh-d41042f92d17d8a0ae6ad3b79ea3f8f8ff791cfc.tar.xz
libssh-d41042f92d17d8a0ae6ad3b79ea3f8f8ff791cfc.zip
pki: Avoid a possible segfaults in error paths
Found by csbuild. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r--src/pki.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pki.c b/src/pki.c
index d6127f0e..b196e915 100644
--- a/src/pki.c
+++ b/src/pki.c
@@ -2114,7 +2114,7 @@ ssh_string ssh_pki_do_sign(ssh_session session,
break;
default:
SSH_LOG(SSH_LOG_TRACE, "Unknown hash algorithm for type: %d",
- sig->type);
+ hash_type);
ssh_string_free(session_id);
ssh_buffer_free(buf);
return NULL;
@@ -2266,7 +2266,7 @@ ssh_string ssh_srv_pki_do_sign_sessionid(ssh_session session,
hlen = SHA_DIGEST_LEN;
break;
default:
- SSH_LOG(SSH_LOG_TRACE, "Unknown sig->type: %d", sig->type);
+ SSH_LOG(SSH_LOG_TRACE, "Unknown sig->type: %d", hash_type);
return NULL;
}