2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-30 22:05:46 +00:00

Merge pull request #169 from kempstonjoystick/main

Fix incorrect SHA384/512 digest calculation.
This commit is contained in:
Todd C. Miller
2022-08-02 10:33:02 -06:00
committed by GitHub

View File

@@ -490,7 +490,7 @@ SHA512Pad(SHA2_CTX *ctx)
SHA512Update(ctx, (uint8_t *)"\200", 1);
/* Pad message such that the resulting length modulo 1024 is 896. */
while ((ctx->count[0] & 1008) != 896)
while ((ctx->count[0] & 1016) != 896)
SHA512Update(ctx, (uint8_t *)"\0", 1);
/* Append length of message in bits and do final SHA512Transform(). */