diff options
author | Anderson Toshiyuki Sasaki <ansasaki@redhat.com> | 2018-09-13 16:52:58 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2018-09-18 10:19:59 +0200 |
commit | 63aa274f4b7ee34f108f284d63a1e921308ef628 (patch) | |
tree | 4cec323b4e83ab54803db2d4efdb269fe9e083e0 /tests | |
parent | 8170e3007311758e55fc7f7566a63dd113746d30 (diff) | |
download | libssh-63aa274f4b7ee34f108f284d63a1e921308ef628.tar.gz libssh-63aa274f4b7ee34f108f284d63a1e921308ef628.tar.xz libssh-63aa274f4b7ee34f108f284d63a1e921308ef628.zip |
tests: Add null checks in torture_threads_pki_rsa.c
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unittests/torture_threads_pki_rsa.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/unittests/torture_threads_pki_rsa.c b/tests/unittests/torture_threads_pki_rsa.c index 5cef6a53..d19d8bbf 100644 --- a/tests/unittests/torture_threads_pki_rsa.c +++ b/tests/unittests/torture_threads_pki_rsa.c @@ -274,12 +274,14 @@ static void *thread_pki_rsa_publickey_from_privatekey(void *threadid) NULL, &key); assert_true(rc == 0); + assert_non_null(key); ok = ssh_key_is_private(key); assert_true(ok); rc = ssh_pki_export_privkey_to_pubkey(key, &pubkey); assert_true(rc == SSH_OK); + assert_non_null(pubkey); ssh_key_free(key); ssh_key_free(pubkey); |