From fd65f0eaabb4849114cfad94e4653c69cfa2ebdf Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Wed, 11 Mar 2026 23:14:07 +0100 Subject: [PATCH] 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 --- tests/suites/test_suite_rsa.function | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/suites/test_suite_rsa.function b/tests/suites/test_suite_rsa.function index 98ea9efb1c..5a30cf079a 100644 --- a/tests/suites/test_suite_rsa.function +++ b/tests/suites/test_suite_rsa.function @@ -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);