fixed segfault in free(), used strlen of wrong variable. fixes #5

This commit is contained in:
TLINDEN
2014-12-21 12:31:44 +01:00
parent 1e3f6c8bc2
commit 6c42c964b9

View File

@@ -185,7 +185,7 @@ int pcpencrypt(char *id, char *infile, char *outfile, char *passwd, plist_t *rec
memcpy(salt, stsalt, 90);
symkey = pcp_scrypt(ptx, passphrase, strlen(passphrase), salt, 90);
free(salt);
ucfree(passphrase, strlen(passwd)+1);
ucfree(passphrase, strlen(passphrase));
}
else if(id != NULL && recipient == NULL) {
/* lookup by id */