From d552ac3fa6d0a95e614293b655253654743b6aae Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Tue, 21 Nov 2017 00:11:14 +0100 Subject: [PATCH] crypto/gc-sm3: Fix buffer overrun. * lib/gc-gnulib.c (MAX_DIGEST_SIZE): Bump to 32. Reported by Coverity. --- ChangeLog | 6 ++++++ lib/gc-gnulib.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 1de257a64b..1d77e436e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2017-11-20 Bruno Haible + + crypto/gc-sm3: Fix buffer overrun. + * lib/gc-gnulib.c (MAX_DIGEST_SIZE): Bump to 32. + Reported by Coverity. + 2017-11-12 Jim Meyering maint: shorten https://lists.gnu.org/archive/html/... links diff --git a/lib/gc-gnulib.c b/lib/gc-gnulib.c index f888cf5970..62074b16b7 100644 --- a/lib/gc-gnulib.c +++ b/lib/gc-gnulib.c @@ -602,7 +602,7 @@ gc_cipher_close (gc_cipher_handle handle) /* Hashes. */ -#define MAX_DIGEST_SIZE 20 +#define MAX_DIGEST_SIZE 32 typedef struct _gc_hash_ctx { -- 2.39.5