Skip to content

Commit

Permalink
Merge pull request P-H-C#129 from technion/uninitialized
Browse files Browse the repository at this point in the history
Properly zero pwd pointed before using it.
  • Loading branch information
sneves committed Apr 11, 2016
2 parents a42a5b1 + 69a13b4 commit 26c2724
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/argon2.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ int argon2_verify(const char *encoded, const void *pwd, const size_t pwdlen,
ctx.free_cbk = NULL;
ctx.secret = NULL;
ctx.secretlen = 0;
ctx.pwdlen = 0;
ctx.pwd = NULL;
ctx.ad = malloc(ctx.adlen);
ctx.salt = malloc(ctx.saltlen);
ctx.out = malloc(ctx.outlen);
Expand Down

0 comments on commit 26c2724

Please sign in to comment.