]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
* twofish.c (twofish_decrypt): Fixed for();-bug in the block-loop.
authorNiels Möller <nisse@lysator.liu.se>
Sun, 2 Sep 2001 22:10:09 +0000 (00:10 +0200)
committerNiels Möller <nisse@lysator.liu.se>
Sun, 2 Sep 2001 22:10:09 +0000 (00:10 +0200)
Spotted by Jean-Pierre.
(twofish_encrypt): Likewise.

Rev: src/nettle/twofish.c:1.5

twofish.c

index 100a39c7d8c428227b6b9efe5d74362b0ce40558..2a341e844b0974c2487edc5e3983c56e9674e39a 100644 (file)
--- a/twofish.c
+++ b/twofish.c
@@ -337,7 +337,7 @@ twofish_encrypt(struct twofish_ctx *context,
   uint32_t (*s_box)[256] = context->s_box;
 
   assert( !(length % TWOFISH_BLOCK_SIZE) );
-  for ( ; length; length -= TWOFISH_BLOCK_SIZE);
+  for ( ; length; length -= TWOFISH_BLOCK_SIZE)
     {  
       uint32_t words[4];
       uint32_t r0, r1, r2, r3, t0, t1;
@@ -408,7 +408,7 @@ twofish_decrypt(struct twofish_ctx *context,
   uint32_t (*s_box)[256] = context->s_box;
 
   assert( !(length % TWOFISH_BLOCK_SIZE) );
-  for ( ; length; length -= TWOFISH_BLOCK_SIZE);
+  for ( ; length; length -= TWOFISH_BLOCK_SIZE)
     {  
       uint32_t words[4];
       uint32_t r0, r1, r2, r3, t0, t1;