diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-10-16 21:34:36 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-10-16 21:34:36 +0200 |
commit | 1ac476bb8561f57703b84f090ed7a575fa512823 (patch) | |
tree | afefea33aece76219b71a4880cd3c9c36f6210e8 | |
parent | e8ee86250d78b7a9c59699aca597f392c1593225 (diff) | |
download | busybox-w32-1ac476bb8561f57703b84f090ed7a575fa512823.tar.gz busybox-w32-1ac476bb8561f57703b84f090ed7a575fa512823.tar.bz2 busybox-w32-1ac476bb8561f57703b84f090ed7a575fa512823.zip |
md5: fix "fast" md5 broken by prev commit
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | libbb/md5.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libbb/md5.c b/libbb/md5.c index 3c24bc60b..f192d0e47 100644 --- a/libbb/md5.c +++ b/libbb/md5.c | |||
@@ -245,6 +245,7 @@ static void md5_hash_block(md5_ctx_t *ctx) | |||
245 | OP(C, D, A, B, 17, 0xa679438e); | 245 | OP(C, D, A, B, 17, 0xa679438e); |
246 | OP(B, C, D, A, 22, 0x49b40821); | 246 | OP(B, C, D, A, 22, 0x49b40821); |
247 | # endif | 247 | # endif |
248 | words -= 16; | ||
248 | 249 | ||
249 | /* For the second to fourth round we have the possibly swapped words | 250 | /* For the second to fourth round we have the possibly swapped words |
250 | in WORDS. Redefine the macro to take an additional first | 251 | in WORDS. Redefine the macro to take an additional first |
@@ -252,7 +253,7 @@ static void md5_hash_block(md5_ctx_t *ctx) | |||
252 | # undef OP | 253 | # undef OP |
253 | # define OP(f, a, b, c, d, k, s, T) \ | 254 | # define OP(f, a, b, c, d, k, s, T) \ |
254 | do { \ | 255 | do { \ |
255 | a += f(b, c, d) + correct_words[k] + T; \ | 256 | a += f(b, c, d) + words[k] + T; \ |
256 | a = rotl32(a, s); \ | 257 | a = rotl32(a, s); \ |
257 | a += b; \ | 258 | a += b; \ |
258 | } while (0) | 259 | } while (0) |