summaryrefslogtreecommitdiff
path: root/usr.bin/tcfs/tcfsgenkey.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/tcfs/tcfsgenkey.c')
-rw-r--r--usr.bin/tcfs/tcfsgenkey.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tcfs/tcfsgenkey.c b/usr.bin/tcfs/tcfsgenkey.c
index d811fa846f4..54833865582 100644
--- a/usr.bin/tcfs/tcfsgenkey.c
+++ b/usr.bin/tcfs/tcfsgenkey.c
@@ -75,12 +75,12 @@ genkey_main (int argn, char *argv[])
/*
* Encrypt the generated key with user password
*/
- cryptedkey = (char*)calloc(UUKEYSIZE, sizeof(char));
+ cryptedkey = (char*)calloc(UUKEYSIZE + 1, sizeof(char));
if (!cryptedkey)
tcfs_error (ER_MEM, NULL);
- if (!tcfs_encrypt_key (user, passwd, newkey, cryptedkey, USERKEY))
+ if (!tcfs_encrypt_key (passwd, newkey, KEYSIZE, cryptedkey, UUKEYSIZE + 1))
tcfs_error (ER_MEM, NULL);
/*