1
0
Fork 0
mirror of https://github.com/deltachat/deltachat-core.git synced 2025-10-04 10:19:16 +02:00

fix bug found by valgrind: init symmetric-decryption with correct blocksize

This commit is contained in:
B. Petersen 2018-07-12 19:41:14 +02:00
parent 9c841ad10b
commit 1c7ed9af7e
2 changed files with 2 additions and 2 deletions

View file

@ -628,7 +628,7 @@ pgp_decrypt_buf(pgp_io_t *io,
/* tidy up */ /* tidy up */
pgp_writer_close(parse->cbinfo.output); pgp_writer_close(parse->cbinfo.output);
pgp_output_delete(parse->cbinfo.output); pgp_output_delete(parse->cbinfo.output);
if (!parse->cbinfo.gotpass) { if (!parse->cbinfo.gotpass) { // EDIT BY MR
pgp_memory_free(outmem); pgp_memory_free(outmem);
outmem = NULL; /* if we didn't get the passphrase, return NULL */ outmem = NULL; /* if we didn't get the passphrase, return NULL */
} }

View file

@ -3287,7 +3287,7 @@ static int parse_sk_sesskey(pgp_region_t *region, pgp_stream_t *stream)
} }
/* decrypt the read data */ /* decrypt the read data */
iv = calloc(1, stream->decrypt.blocksize); if( iv == NULL ) { goto cleanup; } iv = calloc(1, ci.blocksize); if( iv == NULL ) { goto cleanup; } // EDIT BY MR
ci.set_iv(&ci, iv); ci.set_iv(&ci, iv);
free(iv); free(iv);
iv = NULL; iv = NULL;