From: Ruud de Rooij Date: Fri, 12 Mar 1999 16:26:49 +0000 (+0100) Subject: * src/symmetric/twofish.c: Buglet fix by Ruud. X-Git-Tag: release_nettle_0.2.20010617~75 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c1f9522d91bfd8c711cbdab7bd2dd1ce3522a7b6;p=thirdparty%2Fnettle.git * src/symmetric/twofish.c: Buglet fix by Ruud. Rev: src/symmetric/twofish.c:1.4 --- diff --git a/twofish.c b/twofish.c index 9945a2fa..3837c3f3 100644 --- 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;