If an end user cancels the edit_envelope action, then cleanup is called.
When using directly the x_original_to address list directly, this
cleanup stage did actually clean the x_original_to pointer. Should the
user reply again to the same message, then the pointer would point to 0
and then any "unsafe" operation on it would trigger a SIGSEGV. Copying
it solves this issue safely.
*/
if (cur->env->x_original_to && !msg->env->from)
{
- msg->env->from = cur->env->x_original_to;
+ msg->env->from = mutt_addr_copy_list(cur->env->x_original_to, false);
/* Not more than one from address */
msg->env->from->next = NULL;
mutt_debug(5, "msg->env->from extracted from X-Original-To: header: %s\n",