fix double free, add todo

This commit is contained in:
TLINDEN
2015-08-16 21:34:39 +02:00
parent 3b6933d34f
commit 32030afd62
2 changed files with 5 additions and 2 deletions

2
TODO
View File

@@ -20,6 +20,8 @@ Error: Invalid argument
Aborted Aborted
If with -k passphrase has been retrieved interactively, ask
to proceed if low entropy.
detach keysig generation from pub key export, so that an existing detach keysig generation from pub key export, so that an existing

View File

@@ -42,7 +42,7 @@ int main() {
fprintf(stderr, "Alice encrypted %"FMT_SIZE_T" bytes for Bob:\n", (SIZE_T_CAST)strlen(message)); fprintf(stderr, "Alice encrypted %"FMT_SIZE_T" bytes for Bob:\n", (SIZE_T_CAST)strlen(message));
buffer_dump(ps_buffer(crypt_out)); buffer_dump(ps_buffer(crypt_out));
/* ---- encryption don, now decrypt ---- */ /* ---- encryption done, now decrypt ---- */
/* prepare the output buffer stream */ /* prepare the output buffer stream */
clear_out = ps_new_outbuffer(); clear_out = ps_new_outbuffer();
@@ -52,6 +52,8 @@ int main() {
omitted when using a Vault. */ omitted when using a Vault. */
pcphash_add(ptx, alicepub, alicepub->type); pcphash_add(ptx, alicepub, alicepub->type);
buffer_info(crypt_out->b);
/* try to decrypt the message */ /* try to decrypt the message */
if(pcp_decrypt_stream(ptx, crypt_out, clear_out, bob, NULL, 0, 0) == 0) if(pcp_decrypt_stream(ptx, crypt_out, clear_out, bob, NULL, 0, 0) == 0)
fatals_ifany(ptx); fatals_ifany(ptx);
@@ -68,7 +70,6 @@ int main() {
ptx_clean(ptx); ptx_clean(ptx);
free(alice); free(alice);
free(alicepub);
free(bob); free(bob);
free(bobpub); free(bobpub);