From 34b5319d86eb639794dcccc56a443e7a35daf5d3 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Tue, 16 May 2006 02:38:26 +0000 Subject: Make md5 calculation always go through an the buffer so that A) we don't handle packets out of sequence if some data goes through the buffer and some doesn't, B) it works on systems that can't handle aligned access, C) we just have one code path to worry about. While we're at it, sizeof() and RESERVE_CONFIG_BUFFER() really don't combine well, which is why md5sum has been reading and processing data 4 bytes at a time. I suspect that the existence of CONFIG_MD5_SIZE_VS_SPEED to do loop unrolling and such in the algorithm was an attempt to work around that bug. --- include/libbb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/libbb.h b/include/libbb.h index 39361a232..02927cd77 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -506,7 +506,7 @@ typedef struct _md5_ctx_t_ { uint32_t B; uint32_t C; uint32_t D; - uint32_t total[2]; + uint64_t total; uint32_t buflen; char buffer[128]; } md5_ctx_t; -- cgit v1.2.3