From 17f90be1034d1ebcf1f62744a1b5e35c475cee18 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Niels=20M=C3=B6ller?= <nisse@lysator.liu.se>
Date: Thu, 10 Feb 2011 11:21:21 +0100
Subject: [PATCH] (union gcm_block): Use correct length for w array.

Rev: nettle/ChangeLog:1.146
Rev: nettle/gcm.h:1.9
---
 ChangeLog | 2 ++
 gcm.h     | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 7e56534e..0aa7ec20 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2011-02-10  Niels M�ller  <nisse@lysator.liu.se>
 
+	* gcm.h (union gcm_block): Use correct length for w array.
+
 	* testsuite/gcm-test.c (test_main): Added the rest of the
 	testcases from the spec.
 
diff --git a/gcm.h b/gcm.h
index 4366bd86..2c1d7a60 100644
--- a/gcm.h
+++ b/gcm.h
@@ -64,7 +64,7 @@ extern "C" {
 union gcm_block
 {
   uint8_t b[GCM_BLOCK_SIZE];
-  unsigned long w[1];
+  unsigned long w[GCM_BLOCK_SIZE / sizeof(unsigned long)];
 };
 
 /* Hashing subkey */
-- 
GitLab