From 82c7c45924861a51cf501f559994a17a91f6470e Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Thu, 21 Jan 2016 08:39:47 +0100 Subject: [PATCH] zero the context, in case we forget to initialize some members --- src/libsodium/crypto_pwhash/argon2/argon2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libsodium/crypto_pwhash/argon2/argon2.c b/src/libsodium/crypto_pwhash/argon2/argon2.c index b28cd3af..750af34b 100644 --- a/src/libsodium/crypto_pwhash/argon2/argon2.c +++ b/src/libsodium/crypto_pwhash/argon2/argon2.c @@ -178,6 +178,8 @@ int argon2_verify(const char *encoded, const void *pwd, const size_t pwdlen, uint8_t *out; int ret; + memset(&ctx, 0, sizeof ctx); + /* max values, to be updated in decode_string */ ctx.adlen = 512; ctx.saltlen = 512;