Skip to content

Commit 4550814

Browse files
committed
wc_XChaCha20Poly1305_Init: NULL check aead, not ad
1 parent 2a5256b commit 4550814

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

wolfcrypt/src/chacha20_poly1305.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ int wc_XChaCha20Poly1305_Init(
313313
byte authKey[CHACHA20_POLY1305_AEAD_KEYSIZE];
314314
int ret;
315315

316-
if ((ad == NULL) || (nonce == NULL) || (key == NULL))
316+
if ((aead == NULL) || (nonce == NULL) || (key == NULL))
317317
return BAD_FUNC_ARG;
318318

319319
if ((key_len != CHACHA20_POLY1305_AEAD_KEYSIZE) ||

0 commit comments

Comments
 (0)