Commit c1f9522d authored by Ruud de Rooij's avatar Ruud de Rooij Committed by Niels Möller

* src/symmetric/twofish.c: Buglet fix by Ruud.

Rev: src/symmetric/twofish.c:1.4
parent 02f8d551
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment