[PATCH 1/2] cipher:gcm: Minor fix for buffer size.

NIIBE Yutaka via Gcrypt-devel <[email protected]> Fri, 4 Jul 2025 09:58:05 +0900
Newsgroups gmane.comp.encryption.gpg.libgcrypt.devel
Message-ID <e414699f5da7b54665c5496487beb68b753514f2.1751590666.git.gniibe@fsij.org>
* cipher/cipher-internal.h (struct gcry_cipher_handle): Use
GCRY_GCM_BLOCK_LEN.

--

The constants are same, but it's good to use "GCM" semantically.

Signed-off-by: NIIBE Yutaka <[email protected]>
---
 cipher/cipher-internal.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

_______________________________________________
Gcrypt-devel mailing list
[email protected]
https://lists.gnupg.org/mailman/listinfo/gcrypt-devel
0001-cipher-gcm-Minor-fix-for-buffer-size.patch (text/x-patch, 485 B)
diff --git a/cipher/cipher-internal.h b/cipher/cipher-internal.h
index 857b5da8..f2a2099a 100644
--- a/cipher/cipher-internal.h
+++ b/cipher/cipher-internal.h
@@ -352,7 +352,7 @@ struct gcry_cipher_handle
       } u_tag;
 
       /* Space to save partial input lengths for MAC. */
-      unsigned char macbuf[GCRY_CCM_BLOCK_LEN];
+      unsigned char macbuf[GCRY_GCM_BLOCK_LEN];
       int mac_unused;  /* Number of unprocessed bytes in MACBUF. */
 
       /* byte counters for GCM */