diff --git a/library/hmac_drbg.c b/library/hmac_drbg.c index b45d61616f..a7bb24519e 100644 --- a/library/hmac_drbg.c +++ b/library/hmac_drbg.c @@ -97,7 +97,7 @@ int mbedtls_hmac_drbg_update_ret( mbedtls_hmac_drbg_context *ctx, unsigned char rounds = ( additional != NULL && add_len != 0 ) ? 2 : 1; unsigned char sep[1]; unsigned char K[MBEDTLS_MD_MAX_SIZE]; - int ret; + int ret = 0; for( sep[0] = 0; sep[0] < rounds; sep[0]++ ) { diff --git a/library/x509_crt.c b/library/x509_crt.c index 14c53fcbfc..84d74b7fcd 100644 --- a/library/x509_crt.c +++ b/library/x509_crt.c @@ -2043,7 +2043,7 @@ static int x509_crt_find_parent_in( { int ret; mbedtls_x509_crt *parent, *fallback_parent; - int signature_is_good, fallback_signature_is_good; + int signature_is_good = 0, fallback_signature_is_good; #if defined(MBEDTLS_ECDSA_C) && defined(MBEDTLS_ECP_RESTARTABLE) /* did we have something in progress? */