From 8fc16f75e72528ba82cfe608c5a0fefb03b3f1ca Mon Sep 17 00:00:00 2001 From: jordan Date: Tue, 11 Aug 2026 11:48:23 -0500 Subject: [PATCH] ecc: check return of wc_InitMutex ecc_oid_cache_lock. --- wolfcrypt/src/ecc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wolfcrypt/src/ecc.c b/wolfcrypt/src/ecc.c index 23bfbea7a5..a723b3e552 100644 --- a/wolfcrypt/src/ecc.c +++ b/wolfcrypt/src/ecc.c @@ -16937,7 +16937,10 @@ int wc_ecc_get_oid(word32 oidSum, const byte** oid, word32* oidSz) #ifndef WOLFSSL_MUTEX_INITIALIZER /* extra sanity check if wolfCrypt_Init not called */ if (eccOidLockInit == 0) { - wc_InitMutex(&ecc_oid_cache_lock); + ret = wc_InitMutex(&ecc_oid_cache_lock); + if (ret != 0) { + return BAD_MUTEX_E; + } eccOidLockInit = 1; } #endif