Error from argon2_hash() during verify propagated. (#1039)

This commit is contained in:
martingd 2021-03-12 18:01:08 +01:00 committed by Frank Denis
parent ed9e3e18f1
commit b335abd946

View File

@ -261,7 +261,7 @@ argon2_verify(const char *encoded, const void *pwd, const size_t pwdlen,
free(ctx.ad); free(ctx.ad);
free(ctx.salt); free(ctx.salt);
if (ret != ARGON2_OK || sodium_memcmp(out, ctx.out, ctx.outlen) != 0) { if (ret == ARGON2_OK && sodium_memcmp(out, ctx.out, ctx.outlen) != 0) {
ret = ARGON2_VERIFY_MISMATCH; ret = ARGON2_VERIFY_MISMATCH;
} }
free(out); free(out);