Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
[deliverable/linux.git] / drivers / crypto / padlock-sha.c
index a936ba49b390f84603c022a7895f14c9ccd1ab02..76cb6b345e7b4a732e99f1c86b8dfc175a64cb52 100644 (file)
@@ -94,6 +94,7 @@ static int padlock_sha1_finup(struct shash_desc *desc, const u8 *in,
                        memcpy(state.buffer + leftover, in, count);
                        in = state.buffer;
                        count += leftover;
+                       state.count &= ~(SHA1_BLOCK_SIZE - 1);
                }
        }
 
@@ -157,6 +158,7 @@ static int padlock_sha256_finup(struct shash_desc *desc, const u8 *in,
                        memcpy(state.buf + leftover, in, count);
                        in = state.buf;
                        count += leftover;
+                       state.count &= ~(SHA1_BLOCK_SIZE - 1);
                }
        }
 
This page took 0.03997 seconds and 5 git commands to generate.