This commit is contained in:
Sergey Lyubka committed 2022-07-01 17:28:06 +01:00
1 parent a183621268
commit f1da8542ce
20 files changed
+136 -120

No files matched your search

+2 -2
View File
@@ -1,5 +1,5 @@
#include <string.h>
#include "md5.h"
#include "arch.h"
#if defined(MG_ENABLE_MD5) && MG_ENABLE_MD5
#if !defined(BYTE_ORDER) && defined(__BYTE_ORDER)
@@ -16,7 +16,7 @@ static void mg_byte_reverse(unsigned char *buf, unsigned longs) {
/* Forrest: MD5 expect LITTLE_ENDIAN, swap if BIG_ENDIAN */
#if BYTE_ORDER == BIG_ENDIAN
do {
uint32_t t = (uint32_t)((unsigned) buf[3] << 8 | buf[2]) << 16 |
uint32_t t = (uint32_t) ((unsigned) buf[3] << 8 | buf[2]) << 16 |
((unsigned) buf[1] << 8 | buf[0]);
*(uint32_t *) buf = t;
buf += 4;