1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-24 04:25:10 -07:00

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.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;
}
free(out);