Re: Segmentation fault
Hello,
this isn't a nice patch, but it should drop the warning. And I am not
sure if the threading bug is the one which was original reported. Maybe
you should run mutt with the patch in and valgrind it again a day or two
and send us the output.
Sincerely,
Thomas
--- a/imap/message.c
+++ b/imap/message.c
@@ -469,6 +469,8 @@
hash_delete (ctx->id_hash, h->env->message_id, h, NULL);
if (ctx->subj_hash && h->env->real_subj)
hash_delete (ctx->subj_hash, h->env->real_subj, h, NULL);
+ if (ctx->thread_hash && h->env->message_id)
+ hash_delete (ctx->thread_hash, h->env->message_id, h, NULL);
mutt_free_envelope (&h->env);
h->env = mutt_read_rfc822_header (msg->fp, h, 0, 0);
if (ctx->id_hash && h->env->message_id)
--- a/imap/util.c
+++ b/imap/util.c
@@ -138,11 +138,11 @@
{
*c = '\0';
strfcpy (mx->account.user, tmp, sizeof (mx->account.user));
- strfcpy (tmp, c+1, sizeof (tmp));
+ c++;
mx->account.flags |= M_ACCT_USER;
}
- if ((n = sscanf (tmp, "%127[^:/]%127s", mx->account.host, tmp)) < 1)
+ if ((n = sscanf (c, "%127[^:/]%127s", mx->account.host, c)) < 1)
{
dprint (1, (debugfile, "imap_parse_path: NULL host in %s\n", path));
FREE (&mx->mbox);
@@ -150,11 +150,11 @@
}
if (n > 1) {
- if (sscanf (tmp, ":%hu%127s", &(mx->account.port), tmp) >= 1)
+ if (sscanf (c, ":%hu%127s", &(mx->account.port), c) >= 1)
mx->account.flags |= M_ACCT_PORT;
- if (sscanf (tmp, "/%s", tmp) == 1)
+ if (sscanf (c, "/%s", c) == 1)
{
- if (!ascii_strncmp (tmp, "ssl", 3))
+ if (!ascii_strncmp (c, "ssl", 3))
mx->account.flags |= M_ACCT_SSL;
else
{