diff options
author | cr-marcstevens <github@marc-stevens.nl> | 2017-03-13 23:06:49 +0300 |
---|---|---|
committer | cr-marcstevens <github@marc-stevens.nl> | 2017-03-13 23:06:49 +0300 |
commit | 6e60421533749586a0336976e471d9c91f6fd8a3 (patch) | |
tree | 2bd13393129fa2dc936af7f107173ebe00ae1274 | |
parent | b17728507ae4c8c13ff4eb521f3d24b493fbe150 (diff) |
Small bug fix for new code when UBC is disabled
-rw-r--r-- | lib/sha1.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -985,8 +985,9 @@ sha1_recompression_type sha1_recompression_step[80] = void sha1_process(SHA1_CTX* ctx, const uint32_t block[16]) { unsigned i, j; - uint32_t ubc_dv_mask[DVMASKSIZE] = { 0 }; + uint32_t ubc_dv_mask[DVMASKSIZE] = { 0xFFFFFFFF }; uint32_t ihvtmp[5]; + /* for (i=0; i < DVMASKSIZE; ++i) ubc_dv_mask[i]=0; @@ -1001,15 +1002,12 @@ void sha1_process(SHA1_CTX* ctx, const uint32_t block[16]) if (ctx->detect_coll) { - int perform_full_check = 1; - if (ctx->ubc_check) { ubc_check(ctx->m1, ubc_dv_mask); - perform_full_check = CHECK_DVMASK(ubc_dv_mask); } - if (perform_full_check) + if (ubc_dv_mask[0] != 0) { for (i = 0; sha1_dvs[i].dvType != 0; ++i) { |