yarrow: prevent access to NULL pointer
This commit is contained in:
parent
9c4fc762fc
commit
77860ba866
@ -343,11 +343,13 @@ int yarrow_test(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* now let's test the hash/cipher that was chosen */
|
/* now let's test the hash/cipher that was chosen */
|
||||||
if ((err = cipher_descriptor[prng.yarrow.cipher].test()) != CRYPT_OK) {
|
if (cipher_descriptor[prng.yarrow.cipher].test &&
|
||||||
return err;
|
((err = cipher_descriptor[prng.yarrow.cipher].test()) != CRYPT_OK)) {
|
||||||
|
return err;
|
||||||
}
|
}
|
||||||
if ((err = hash_descriptor[prng.yarrow.hash].test()) != CRYPT_OK) {
|
if (hash_descriptor[prng.yarrow.hash].test &&
|
||||||
return err;
|
((err = hash_descriptor[prng.yarrow.hash].test()) != CRYPT_OK)) {
|
||||||
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
return CRYPT_OK;
|
return CRYPT_OK;
|
||||||
|
Loading…
Reference in New Issue
Block a user