[git commit master 1/1] md5: fix "fast" md5 broken by prev commit
Denys Vlasenko
vda.linux at googlemail.com
Sat Oct 16 19:34:36 UTC 2010
commit: http://git.busybox.net/busybox/commit/?id=1ac476bb8561f57703b84f090ed7a575fa512823
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
libbb/md5.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/libbb/md5.c b/libbb/md5.c
index 3c24bc6..f192d0e 100644
--- a/libbb/md5.c
+++ b/libbb/md5.c
@@ -245,6 +245,7 @@ static void md5_hash_block(md5_ctx_t *ctx)
OP(C, D, A, B, 17, 0xa679438e);
OP(B, C, D, A, 22, 0x49b40821);
# endif
+ words -= 16;
/* For the second to fourth round we have the possibly swapped words
in WORDS. Redefine the macro to take an additional first
@@ -252,7 +253,7 @@ static void md5_hash_block(md5_ctx_t *ctx)
# undef OP
# define OP(f, a, b, c, d, k, s, T) \
do { \
- a += f(b, c, d) + correct_words[k] + T; \
+ a += f(b, c, d) + words[k] + T; \
a = rotl32(a, s); \
a += b; \
} while (0)
--
1.7.1
More information about the busybox-cvs
mailing list