From 4af6eb4f2bb6ebf040f4e6294a3f5d0bd26913d8 Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Tue, 23 Sep 2025 17:06:22 -0500 Subject: [PATCH] wolfcrypt/src/chacha20_poly1305.c: in wc_XChaCha20Poly1305_crypt_oneshot(), allow empty message. --- wolfcrypt/src/chacha20_poly1305.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wolfcrypt/src/chacha20_poly1305.c b/wolfcrypt/src/chacha20_poly1305.c index 7e665b75c..0503726bf 100644 --- a/wolfcrypt/src/chacha20_poly1305.c +++ b/wolfcrypt/src/chacha20_poly1305.c @@ -401,7 +401,7 @@ static WC_INLINE int wc_XChaCha20Poly1305_crypt_oneshot( goto out; } - if (dst_len <= 0 || (long int)dst_space < dst_len) { + if (dst_len < 0 || (long int)dst_space < dst_len) { ret = BUFFER_E; goto out; }