forked from wolfSSL/wolfssl
fix for PKCS7 KEKRI array bounds check warning on gcc 8.2.0
This commit is contained in:
@ -6683,6 +6683,10 @@ int wc_PKCS7_AddRecipient_KEKRI(PKCS7* pkcs7, int keyWrapOID, byte* kek,
|
|||||||
return encryptedKeySz;
|
return encryptedKeySz;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (encryptedKeySz > MAX_ENCRYPTED_KEY_SZ) {
|
||||||
|
return WC_KEY_SIZE_E;
|
||||||
|
}
|
||||||
|
|
||||||
encKeyOctetStrSz = SetOctetString(encryptedKeySz, encKeyOctetStr);
|
encKeyOctetStrSz = SetOctetString(encryptedKeySz, encKeyOctetStr);
|
||||||
totalSz += (encKeyOctetStrSz + encryptedKeySz);
|
totalSz += (encKeyOctetStrSz + encryptedKeySz);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user