aboutsummaryrefslogtreecommitdiffstats
path: root/g10/cipher-aead.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/cipher-aead.c')
-rw-r--r--g10/cipher-aead.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/g10/cipher-aead.c b/g10/cipher-aead.c
index 573bb43fb..cc306f900 100644
--- a/g10/cipher-aead.c
+++ b/g10/cipher-aead.c
@@ -244,7 +244,8 @@ write_final_chunk (cipher_filter_context_t *cfx, iobuf_t a)
gpg_error_t err;
char dummy[1];
- cfx->chunkindex++;
+ if (cfx->chunklen)
+ cfx->chunkindex++;
err = set_nonce (cfx);
if (err)