mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-05 16:40:49 +02:00
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:
+4
-1
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user