From 903c5fe369bc4948718a7d2a0e19b1acdb2406c4 Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Tue, 22 Feb 2022 21:12:54 +0900 Subject: gpg: Fix generating AEAD packet. * g10/cipher-aead.c (do_free): Fix the condition of the last chunk. -- GnuPG-bug-id: 5853 Signed-off-by: NIIBE Yutaka --- g10/cipher-aead.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/g10/cipher-aead.c b/g10/cipher-aead.c index 1fd2021e5..8dd6611ff 100644 --- a/g10/cipher-aead.c +++ b/g10/cipher-aead.c @@ -362,7 +362,7 @@ do_free (cipher_filter_context_t *cfx, iobuf_t a) if (DBG_FILTER) log_debug ("do_free: buflen=%zu\n", cfx->buflen); - if (cfx->buflen) + if (cfx->chunklen) { if (DBG_FILTER) log_debug ("encrypting last %zu bytes of the last chunk\n",cfx->buflen); -- cgit v1.2.3