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

[Mutt] #3273: mutt: every unmailboxes command segfaults



#3273: mutt: every unmailboxes command segfaults
------------------------------+---------------------------------------------
 Reporter:  antonio@xxxxxxxx  |       Owner:  mutt-dev
     Type:  defect            |      Status:  new     
 Priority:  major             |   Milestone:          
Component:  mutt              |     Version:  1.5.20  
 Keywords:                    |  
------------------------------+---------------------------------------------
 Forwarding from http://bugs.debian.org/533459
 Setting it as major because it is a segfault.

 How to reproduce:
 put the following in your .muttrc
 {{{
 set spoolfile=~/Mail/mbox
 set folder=~/Mail
 mailboxes `echo ~/Mail/*`
 unmailboxes =from
 unmailboxes =junk
 unmailboxes =sent.gz
 unmailboxes =from
 }}}

 Then touch ~/Mail/junk

 run mutt, it will segfault.

 I had a look at the code and tracked down the problem, which is
 unreproducible in 1.5.19-4.

 This commit:
 [5778:1dc96cc13a87:5779:7bc332ddd8fc]
 replaced safe_strdup of tmp->path with strfcpy and it correctly removed
 FREE((*tmp)->path) at line 209, unfortunately it forgot to remove the same
 instruction at line 239, which is causing the segfault.

 The attached patch fixes the problem, it was tested and it worked fine

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