From bd15b68569bbcf77dbdb1730c54dba406ff22c8e Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Tue, 26 Jan 2016 11:14:40 +0100 Subject: [PATCH] Argon2: explicitly initialize ctx.secret to NULL --- src/libsodium/crypto_pwhash/argon2/argon2.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libsodium/crypto_pwhash/argon2/argon2.c b/src/libsodium/crypto_pwhash/argon2/argon2.c index 1f948df8..630cb1eb 100644 --- a/src/libsodium/crypto_pwhash/argon2/argon2.c +++ b/src/libsodium/crypto_pwhash/argon2/argon2.c @@ -182,6 +182,9 @@ int argon2_verify(const char *encoded, const void *pwd, const size_t pwdlen, memset(&ctx, 0, sizeof ctx); + ctx.secret = NULL; + ctx.secretlen = 0; + /* max values, to be updated in decode_string */ encoded_len = strlen(encoded); ctx.adlen = encoded_len;