Merge pull request #9988 from kareem-wolfssl/zd21356

Check raw pubkey length in wc_ecc_import_x963 before copying to it for KCAPI case.
This commit is contained in:
JacobBarthelmeh
2026-03-17 14:12:11 -06:00
committed by GitHub
+4 -1
View File
@@ -10742,7 +10742,10 @@ int wc_ecc_import_x963_ex2(const byte* in, word32 inLen, ecc_key* key,
XMEMCPY(key->pubkey_raw, (byte*)in, inLen);
}
#elif defined(WOLFSSL_KCAPI_ECC)
XMEMCPY(key->pubkey_raw, (byte*)in, inLen);
if (inLen <= (word32)sizeof(key->pubkey_raw))
XMEMCPY(key->pubkey_raw, (byte*)in, inLen);
else
err = BAD_FUNC_ARG;
#endif
if (err == MP_OKAY) {