changeset 39159:e65441735fb0

crypto/gc-sm3: Fix buffer overrun. * lib/gc-gnulib.c (MAX_DIGEST_SIZE): Bump to 32. Reported by Coverity.
author Bruno Haible <bruno@clisp.org>
date Tue, 21 Nov 2017 00:11:14 +0100
parents fe0e7464aae7
children 1dc02097f427
files ChangeLog lib/gc-gnulib.c
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Nov 20 22:11:48 2017 +0300
+++ b/ChangeLog	Tue Nov 21 00:11:14 2017 +0100
@@ -1,3 +1,9 @@
+2017-11-20  Bruno Haible  <bruno@clisp.org>
+
+	crypto/gc-sm3: Fix buffer overrun.
+	* lib/gc-gnulib.c (MAX_DIGEST_SIZE): Bump to 32.
+	Reported by Coverity.
+
 2017-11-12  Jim Meyering  <meyering@fb.com>
 
 	maint: shorten https://lists.gnu.org/archive/html/... links
--- a/lib/gc-gnulib.c	Mon Nov 20 22:11:48 2017 +0300
+++ b/lib/gc-gnulib.c	Tue Nov 21 00:11:14 2017 +0100
@@ -602,7 +602,7 @@
 
 /* Hashes. */
 
-#define MAX_DIGEST_SIZE 20
+#define MAX_DIGEST_SIZE 32
 
 typedef struct _gc_hash_ctx
 {