X-Git-Url: https://git.distorted.org.uk/~mdw/secnet/blobdiff_plain/28db900b071a43718c4227e759fa76cb8c6359af..5ad34db2ccbbfbc936cd16121bed2110b70594ba:/transform.c diff --git a/transform.c b/transform.c index 289b02e..012f618 100644 --- a/transform.c +++ b/transform.c @@ -220,7 +220,7 @@ static uint32_t transform_reverse(void *sst, struct buffer_if *buf, serpent_encrypt(&ti->mackey,macplain,macacc); } serpent_encrypt(&ti->mackey,macacc,macacc); - if (memcmp(macexpected,macacc,16)!=0) { + if (!consttime_memeq(macexpected,macacc,16)!=0) { *errmsg="invalid MAC"; return 1; }