]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
* src/symmetric/twofish.c: Buglet fix by Ruud.
authorRuud de Rooij <ruud@debian.org>
Fri, 12 Mar 1999 16:26:49 +0000 (17:26 +0100)
committerNiels Möller <nisse@lysator.liu.se>
Fri, 12 Mar 1999 16:26:49 +0000 (17:26 +0100)
Rev: src/symmetric/twofish.c:1.4

twofish.c

index 9945a2facca857ab15380819e96de3faf03104a2..3837c3f389f439f179d48108c03610dc2f91b998 100644 (file)
--- a/twofish.c
+++ b/twofish.c
@@ -411,9 +411,7 @@ twofish_setup(TWOFISH_context * context, size_t keysize, const UINT8 *key)
     keysize = 32;
   memcpy(key_copy, key, keysize);
 
-  /* FIXME: This truncates the key if it is not a multiple of 4 octets.
-   * Is this really indended? */
-  bytes_to_words(m, key_copy, keysize/4);
+  bytes_to_words(m, key_copy, (keysize + 3)/4);
 
   if (keysize <= 16)
     k = 2;