mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 11:08:02 -06:00
use burn instead of memset when clearing RIPEMD context to ensure the compiler won't optimize it
This commit is contained in:
@@ -140,7 +140,7 @@ void RMD160Final(unsigned char *digest, RMD160_CTX *ctx)
|
|||||||
if (digest) {
|
if (digest) {
|
||||||
for (i = 0; i < 5; i++)
|
for (i = 0; i < 5; i++)
|
||||||
PUT_32BIT_LE(digest + i * 4, ctx->state[i]);
|
PUT_32BIT_LE(digest + i * 4, ctx->state[i]);
|
||||||
memset (ctx, 0, sizeof(*ctx));
|
burn (ctx, sizeof(*ctx));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user