wc_XChaCha20Poly1305_Init: NULL check aead, not ad

This commit is contained in:
Anthony Hu
2026-01-20 16:37:20 -05:00
parent 2a5256ba18
commit 4550814e66

View File

@@ -313,7 +313,7 @@ int wc_XChaCha20Poly1305_Init(
byte authKey[CHACHA20_POLY1305_AEAD_KEYSIZE];
int ret;
if ((ad == NULL) || (nonce == NULL) || (key == NULL))
if ((aead == NULL) || (nonce == NULL) || (key == NULL))
return BAD_FUNC_ARG;
if ((key_len != CHACHA20_POLY1305_AEAD_KEYSIZE) ||