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.
2 parents e4e79dd + 7d7299e commit baeffb2Copy full SHA for baeffb2
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 ((ad == 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