Skip to content

Commit 3142b0b

Browse files
committed
fp_prime_random_ex: make sure call-back function is not NULL
1 parent fede300 commit 3142b0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/numtheory/fp_prime_random_ex.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ int fp_prime_random_ex(fp_int *a, int t, int size, int flags, tfm_prime_callback
1616
int res, err, bsize, maskOR_msb_offset;
1717

1818
/* sanity check the input */
19-
if (size <= 1 || t <= 0 || t > FP_PRIME_SIZE) {
19+
if (size <= 1 || cb == NULL || t <= 0 || t > FP_PRIME_SIZE) {
2020
return FP_VAL;
2121
}
2222

0 commit comments

Comments
 (0)