talons

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

commit b910bfe858bab51334a6d623580383ec685324ee
parent 4d7fede4294566578f3c4cb9e949e744d140055a
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 @@ -2389,10 +2389,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);