From 5d7e61fb61b1ca174827b0a71a6cef1fec0c91af Mon Sep 17 00:00:00 2001 From: Paul Elliott Date: Tue, 15 Feb 2022 16:05:17 +0000 Subject: [PATCH] Fix uninitialised return value. Signed-off-by: Paul Elliott --- programs/fuzz/common.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/programs/fuzz/common.c b/programs/fuzz/common.c index 465a76e45..4d5840228 100644 --- a/programs/fuzz/common.c +++ b/programs/fuzz/common.c @@ -64,6 +64,9 @@ int dummy_random( void *p_rng, unsigned char *output, size_t output_len ) if( p_rng != NULL ) { //use mbedtls_ctr_drbg_random to find bugs in it ret = mbedtls_ctr_drbg_random(p_rng, output, output_len); + } else { + //fall through to pseudo-random + ret = 0; } #else (void) p_rng;