Merge pull request #7156 from bandi13/checkNullInput

Check NULL input
This commit is contained in:
JacobBarthelmeh
2024-01-22 12:07:20 -08:00
committed by GitHub

View File

@ -114,6 +114,11 @@ int wc_AriaSetKey(wc_Aria* aria, byte* key)
{
MC_RV rv = MC_OK;
MC_UINT keylen;
if (aria == NULL || key == NULL) {
return BAD_FUNC_ARG;
}
if (aria->algo == MC_ALGID_ARIA_128BITKEY) {
keylen = ARIA_128_KEY_SIZE;
} else if (aria->algo == MC_ALGID_ARIA_192BITKEY) {