Fix build error on some platforms where NULL is defined as 0

If `NULL` is an integer constant expression with the value 0 (which C
allows), the expression `prng ? NULL : NULL` is not an integer constant
expression so it is not a null pointer constant, and thus it is not a
pointer.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine 2026-03-11 23:14:07 +01:00
parent 20a60132ab
commit fd65f0eaab

View File

@ -1190,7 +1190,7 @@ void mbedtls_rsa_validate_params(char *input_N,
have_D ? &D : NULL,
have_E ? &E : NULL,
prng ? mbedtls_test_rnd_std_rand : NULL,
prng ? NULL : NULL) == result);
NULL) == result);
exit:
mbedtls_mpi_free(&N);