safe

Password protected secret keeper
git clone git://git.z3bra.org/safe.git
Log | Files | Refs | README | LICENSE

commit 3c694e0f523bbb3332de0efa5721c3940b1a556a
parent c8ba1506f499e21b9a7c5d71c8dc1566c0ea5d0a
Author: z3bra <dev@z3bra.org>
Date:   Wed, 26 Jun 2019 14:31:05 +0200

Fix issues with uninitialized values

Diffstat:
safe.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/safe.c b/safe.c @@ -31,8 +31,8 @@ enum { SAFE_FINAL = 1 << 2, }; -uint8_t *passphrase; -size_t pplen; +uint8_t *passphrase = NULL; +size_t pplen = 0; char *argv0; void @@ -377,8 +377,8 @@ main(int argc, char *argv[]) /* write master password entry if not present */ if (fd < 0 && errno == ENOENT) { - uint8_t *passphrase2; - size_t pplen2; + uint8_t *passphrase2 = NULL; + size_t pplen2 = 0; /* input for master password again to check */ readpass("verify:", &passphrase2, &pplen2);