<<< Date Index >>>     <<< Thread Index >>>

Re: [Mutt] #3288: seg fault in mx_update_context



#3288: seg fault in mx_update_context
---------------------+------------------------------------------------------
  Reporter:  prlw1   |       Owner:  brendan 
      Type:  defect  |      Status:  accepted
  Priority:  major   |   Milestone:          
 Component:  IMAP    |     Version:  1.5.20  
Resolution:          |    Keywords:          
---------------------+------------------------------------------------------

Comment(by antonio@xxxxxxxx):

 same problem here: http://bugs.debian.org/537694

 The ctx->hdrs structure has holes which cause the segfault in
 mx_update_context:

 {{{
 (gdb) print ctx->hdrs[0]
 $7 = (HEADER *) 0x93cfa0
 (gdb) print ctx->hdrs[1]
 $8 = (HEADER *) 0x0
 (gdb) print ctx->hdrs[2]
 $9 = (HEADER *) 0x0
 (gdb) print ctx->hdrs[3]
 $10 = (HEADER *) 0x942df0
 (gdb) print ctx->hdrs[4]
 $11 = (HEADER *) 0x9455e0
 (gdb)
 }}}

 I tried to see your commit but from the UI it looks like a removal of
 trailing spaces, I wasn't able to find the changed line. I've downloaded
 message.c from the hg tip and the only relevant difference I found was a
 mutt_set_flag:

 {{{
 @@ -867,7 +870,6 @@
          if (ctx->hdrs[n]->tagged)
          {
            mutt_set_flag (ctx, ctx->hdrs[n], M_DELETE, 1);
 -         mutt_set_flag (ctx, ctx->hdrs[n], M_APPENDED, 1);
            if (option (OPTDELETEUNTAG))
              mutt_set_flag (ctx, ctx->hdrs[n], M_TAG, 0);
          }
 @@ -875,7 +877,6 @@
      else
      {
        mutt_set_flag (ctx, h, M_DELETE, 1);
 -      mutt_set_flag (ctx, h, M_APPENDED, 1);
        if (option (OPTDELETEUNTAG))
          mutt_set_flag (ctx, h, M_TAG, 0);
      }
 }}}

 Do you want me to remove these and retest? Is this the intended fix?

 Cheers,
 Antonio

-- 
Ticket URL: <http://dev.mutt.org/trac/ticket/3288#comment:5>
Mutt <http://www.mutt.org/>
The Mutt mail user agent