Skip to content

Commit f2a76a0

Browse files
Merge pull request #7156 from bandi13/checkNullInput
Check NULL input
2 parents 0c150d2 + 5c75ca5 commit f2a76a0

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)