align HASH_PROCESS() macro

This commit is contained in:
Steffen Jaeckel 2017-08-08 19:05:59 +02:00
parent c29c9f140d
commit 65dc00e23a

View File

@ -497,7 +497,7 @@ int func_name (hash_state * md, const unsigned char *in, unsigned long inlen)
if (md-> state_var .curlen > sizeof(md-> state_var .buf)) { \ if (md-> state_var .curlen > sizeof(md-> state_var .buf)) { \
return CRYPT_INVALID_ARG; \ return CRYPT_INVALID_ARG; \
} \ } \
if ((md-> state_var .length + inlen) < md-> state_var .length) { \ if ((md-> state_var .length + inlen) < md-> state_var .length) { \
return CRYPT_HASH_OVERFLOW; \ return CRYPT_HASH_OVERFLOW; \
} \ } \
while (inlen > 0) { \ while (inlen > 0) { \
@ -510,7 +510,7 @@ int func_name (hash_state * md, const unsigned char *in, unsigned long inlen)
inlen -= block_size; \ inlen -= block_size; \
} else { \ } else { \
n = MIN(inlen, (block_size - md-> state_var .curlen)); \ n = MIN(inlen, (block_size - md-> state_var .curlen)); \
XMEMCPY(md-> state_var .buf + md-> state_var.curlen, in, (size_t)n); \ XMEMCPY(md-> state_var .buf + md-> state_var.curlen, in, (size_t)n); \
md-> state_var .curlen += n; \ md-> state_var .curlen += n; \
in += n; \ in += n; \
inlen -= n; \ inlen -= n; \