Check NULL input

pull/7156/head
Andras Fekete 2024-01-22 12:45:42 -05:00
parent d2d653cfdc
commit 5c75ca539e
1 changed files with 5 additions and 0 deletions

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) {