talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit e2e7b25a230d13cb0d7557e50de8ab5a5a802724
parent 1cdefe8acb372cc3bc8626d5559d001ea3289d5b
Author: wwp <subscript@free.fr>
Date:   Mon,  4 Oct 2021 09:04:46 +0200

Fix (in a better way) CID 1492307: use after free.

Diffstat:
Msrc/compose.c | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/compose.c b/src/compose.c @@ -2368,10 +2368,13 @@ Compose *compose_reedit(MsgInfo *msginfo, gboolean batch) } if (!account) { account = cur_account; + } + if (!account) { + g_warning("can't select account"); if (manual_headers) procheader_entries_free(manual_headers); + return NULL; } - cm_return_val_if_fail(account != NULL, NULL); compose = compose_create(account, msginfo->folder, COMPOSE_REEDIT, batch);