diff options
author | Jakub Jelen <jjelen@redhat.com> | 2018-09-11 15:05:41 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2018-09-17 16:39:38 +0200 |
commit | 8f7214a584c7a884ae3714b84451cc51027f98e2 (patch) | |
tree | e2aad474cb830d7c718f79b6ed2ca3957ca25477 /src/pki_crypto.c | |
parent | 9d2de880ec889c4ff3c62380175d9d02f77ad462 (diff) | |
download | libssh-8f7214a584c7a884ae3714b84451cc51027f98e2.tar.gz libssh-8f7214a584c7a884ae3714b84451cc51027f98e2.tar.xz libssh-8f7214a584c7a884ae3714b84451cc51027f98e2.zip |
pki: Initialize pointers to NULL
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src/pki_crypto.c')
-rw-r--r-- | src/pki_crypto.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pki_crypto.c b/src/pki_crypto.c index 082f84ff..900e1a14 100644 --- a/src/pki_crypto.c +++ b/src/pki_crypto.c @@ -174,8 +174,8 @@ static ssh_string make_ecpoint_string(const EC_GROUP *g, int pki_pubkey_build_ecdsa(ssh_key key, int nid, ssh_string e) { - EC_POINT *p; - const EC_GROUP *g; + EC_POINT *p = NULL; + const EC_GROUP *g = NULL; int ok; key->ecdsa_nid = nid; @@ -894,7 +894,7 @@ int pki_pubkey_build_dss(ssh_key key, ssh_string g, ssh_string pubkey) { int rc; - BIGNUM *bp, *bq, *bg, *bpub_key; + BIGNUM *bp = NULL, *bq = NULL, *bg = NULL, *bpub_key = NULL; key->dsa = DSA_new(); if (key->dsa == NULL) { @@ -930,7 +930,7 @@ int pki_pubkey_build_rsa(ssh_key key, ssh_string e, ssh_string n) { int rc; - BIGNUM *be, *bn; + BIGNUM *be = NULL, *bn = NULL; key->rsa = RSA_new(); if (key->rsa == NULL) { |