zero the context, in case we forget to initialize some members

This commit is contained in:
Frank Denis 2016-01-21 08:39:47 +01:00
parent ba415e1f4d
commit 82c7c45924

View File

@ -178,6 +178,8 @@ int argon2_verify(const char *encoded, const void *pwd, const size_t pwdlen,
uint8_t *out; uint8_t *out;
int ret; int ret;
memset(&ctx, 0, sizeof ctx);
/* max values, to be updated in decode_string */ /* max values, to be updated in decode_string */
ctx.adlen = 512; ctx.adlen = 512;
ctx.saltlen = 512; ctx.saltlen = 512;