We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4550814 commit 7d7299eCopy full SHA for 7d7299e
wolfcrypt/src/chacha20_poly1305.c
@@ -313,7 +313,8 @@ int wc_XChaCha20Poly1305_Init(
313
byte authKey[CHACHA20_POLY1305_AEAD_KEYSIZE];
314
int ret;
315
316
- if ((aead == NULL) || (nonce == NULL) || (key == NULL))
+ if ((aead == NULL) || (ad == NULL && ad_len > 0) || (nonce == NULL) ||
317
+ (key == NULL))
318
return BAD_FUNC_ARG;
319
320
if ((key_len != CHACHA20_POLY1305_AEAD_KEYSIZE) ||
0 commit comments