]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
(union gcm_block): Use correct length for w array.
authorNiels Möller <nisse@lysator.liu.se>
Thu, 10 Feb 2011 10:21:21 +0000 (11:21 +0100)
committerNiels Möller <nisse@lysator.liu.se>
Thu, 10 Feb 2011 10:21:21 +0000 (11:21 +0100)
Rev: nettle/ChangeLog:1.146
Rev: nettle/gcm.h:1.9

ChangeLog
gcm.h

index 7e56534e66aded0eb73ef506303f3dd7a946ce4e..0aa7ec20f6c9dfaadd75653d813e496c301d2eea 100644 (file)
--- 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 4366bd86af3daced472cb1f9e14d6e46369ebc38..2c1d7a60465e0d058a40aec453821929887b657b 100644 (file)
--- 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 */