@@ -693,9 +693,8 @@ return bad_pw_match; } acct_pw = pw; } else acct_pw = prm, pwlen = strlen(prm); - } else if (op == genpw) { unsigned long long len; if (prm != NULL) { alert(a_debug, "converting length parameter to integer"); @@ -710,8 +709,9 @@ write(1, pw, len); if(tty_out) write(1, "\n", 1); } pwlen = len; + acct_pw = pw; } # ifdef _CLIPBOARD if (copy_pw) copy(pw, pwlen); # endif @@ -721,9 +721,9 @@ 1 + pwlen]; plaintext[0] = acctlen; strncpy(plaintext + 1, acct, acctlen); plaintext[1 + acctlen] = pwlen; - strncpy(plaintext + acctlen + 2, pw, pwlen); + strncpy(plaintext + acctlen + 2, acct_pw, pwlen); hexdump(plaintext, sz(plaintext)); alert(a_debug, "enciphering database entry");