From efa6067ca6128fa12fa068ad841fcb6db5a86b8f Mon Sep 17 00:00:00 2001 From: Ben Kibbey Date: Thu, 2 Jul 2009 20:04:02 -0400 Subject: [PATCH] Fixed converting an unencrypted data file. --- src/pwmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pwmd.c b/src/pwmd.c index 9b5ec269..14f78ef7 100644 --- a/src/pwmd.c +++ b/src/pwmd.c @@ -1927,7 +1927,7 @@ static gpg_error_t convert_file(const gchar *filename, const gchar *keyfile, * So 0 iterations was really -1 in the header. This is fixed in v2 of the * header. */ - if (crypto->fh->ver.fh1.iter >= 0ULL) { + if (crypto->fh->ver.fh1.iter != -1) { if (keyfile) { crypto->tkey = parse_rcfile_keyfile(keyfile, TRUE, &rc); @@ -1966,7 +1966,7 @@ static gpg_error_t convert_file(const gchar *filename, const gchar *keyfile, crypto->fh->v1 = FALSE; - iter = crypto->fh->ver.fh1.iter < 0 ? 0 : crypto->fh->ver.fh1.iter+1ULL; + iter = crypto->fh->ver.fh1.iter+1; memset(&crypto->fh->ver.fh2, 0, sizeof(crypto->fh->ver.fh2)); /* Keep the iterations and key from the original file. */ crypto->fh->ver.fh2.iter = iter; -- 2.11.4.GIT