1
1

tests: Add additional NULL check in torture_pki_rsa_write_privkey()

CID 1393904
CID 1393903

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Этот коммит содержится в:
Andreas Schneider 2018-08-06 08:49:01 +02:00
родитель aeefcd8199
Коммит 67ef808a95

Просмотреть файл

@ -326,6 +326,7 @@ static void torture_pki_rsa_duplicate_key(void **state)
NULL, NULL,
&privkey); &privkey);
assert_true(rc == 0); assert_true(rc == 0);
assert_non_null(privkey);
privkey_dup = ssh_key_dup(privkey); privkey_dup = ssh_key_dup(privkey);
assert_true(privkey_dup != NULL); assert_true(privkey_dup != NULL);
@ -460,6 +461,7 @@ static void torture_pki_rsa_write_privkey(void **state)
NULL, NULL,
&privkey); &privkey);
assert_true(rc == 0); assert_true(rc == 0);
assert_non_null(privkey);
rc = ssh_key_cmp(origkey, privkey, SSH_KEY_CMP_PRIVATE); rc = ssh_key_cmp(origkey, privkey, SSH_KEY_CMP_PRIVATE);
assert_true(rc == 0); assert_true(rc == 0);