#3525: thread.c:432 Mutt crashes with segmentation fault
--------------------+-------------------------------------------------------
 Reporter:  hhorak  |       Owner:  mutt-dev
     Type:  defect  |      Status:  new     
 Priority:  major   |   Milestone:          
Component:  mutt    |     Version:  1.5.20  
 Keywords:          |  
--------------------+-------------------------------------------------------

Comment(by hhorak):

 I'm not aware of a way how to reproduce this failure, but I think the
 following easy workaround should fix it and shouldn't bring another
 regression.

 {{{
 --- thread.c.orig       2011-06-06 13:44:44.941124931 +0200
 +++ thread.c    2011-06-06 13:45:09.828124925 +0200
 @@ -429,7 +429,7 @@ static THREAD *find_subject (CONTEXT *ct
      for (ptr = ctx->subj_hash->table[hash]; ptr; ptr = ptr->next)
      {
        tmp = ((HEADER *) ptr->data)->thread;
 -      if (tmp != cur &&                           /* don't match the same
 message */
 +      if (tmp && tmp != cur &&            /* don't match the same message
 */
           !tmp->fake_thread &&             /* don't match pseudo threads
 */
           tmp->message->subject_changed && /* only match interesting
 replies */
           !is_descendant (tmp, cur) &&     /* don't match in the same
 thread */
 }}}

 What do other thinks about that? Could this change be applied in the code
 to prevent similar failures in the future?

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

Reply via email to