Skip to content

Commit 5c75ca5

Browse files
author
Andras Fekete
committed
Check NULL input
1 parent d2d653c commit 5c75ca5

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

wolfcrypt/src/port/aria/aria-crypt.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@ int wc_AriaSetKey(wc_Aria* aria, byte* key)
114114
{
115115
MC_RV rv = MC_OK;
116116
MC_UINT keylen;
117+
118+
if (aria == NULL || key == NULL) {
119+
return BAD_FUNC_ARG;
120+
}
121+
117122
if (aria->algo == MC_ALGID_ARIA_128BITKEY) {
118123
keylen = ARIA_128_KEY_SIZE;
119124
} else if (aria->algo == MC_ALGID_ARIA_192BITKEY) {

0 commit comments

Comments
 (0)