← Commit list

e08ef581a

Denys Vlasenko
Denys Vlasenko
2010-10-18
FAILED Duration: 266s

Subject

md5: length should be stored in *little-endian* order! fixing...

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

libbb/hash_md5.c+2 -2
@@ -415,9 +415,9 @@ void FAST_FUNC md5_end(md5_ctx_t *ctx, void *resbuf)
memset(ctx->wbuffer + bufpos, 0, remaining);
/* Do we have enough space for the length count? */
if (remaining >= 8) {
- /* Store the 64-bit counter of bits in the buffer in BE format */
+ /* Store the 64-bit counter of bits in the buffer in LE format */
uint64_t t = ctx->total64 << 3;
- t = SWAP_BE64(t);
+ t = SWAP_LE64(t);
/* wbuffer is suitably aligned for this */
*(uint64_t *) (&ctx->wbuffer[64 - 8]) = t;
}