]> Savannah Git Hosting - gnulib.git/commitdiff
crypto/gc-sm3: Fix buffer overrun.
authorBruno Haible <bruno@clisp.org>
Mon, 20 Nov 2017 23:11:14 +0000 (00:11 +0100)
committerBruno Haible <bruno@clisp.org>
Mon, 20 Nov 2017 23:11:14 +0000 (00:11 +0100)
* lib/gc-gnulib.c (MAX_DIGEST_SIZE): Bump to 32.
Reported by Coverity.

ChangeLog
lib/gc-gnulib.c

index 1de257a64b347bfbe42b841ea8b2728252018c07..1d77e436e37ab17998b939b1a7506848fe350f38 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index f888cf59704ac4f484ca07c48613350b72a9a24a..62074b16b746471c8c2b89bc4f6c362ecb8f2d6e 100644 (file)
@@ -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
 {