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

Re: imap/2112: tab completion of imap:// addresses segmentation fault



The following reply was made to PR imap/2112; it has been noted by GNATS.

From: Thomas Roessler <roessler@xxxxxxxxxxxxxxxxxx>
To: bruno@xxxxxxxxxx, bug-any@xxxxxxxxxxxxx
Cc: Mutt Developers <mutt-dev@xxxxxxxx>
Subject: Re: imap/2112: tab completion of imap:// addresses segmentation fault
Date: Fri, 14 Oct 2005 11:30:13 +0200

 On 2005-10-14 11:25:51 +0200, New Mutt PR wrote:
 
 > >Fix:
 
 Here we go:
 
 diff -u -r3.44 imap.c
 --- imap/imap.c        22 Sep 2005 03:09:49 -0000      3.44
 +++ imap/imap.c        14 Oct 2005 09:29:38 -0000
 @@ -1598,7 +1598,7 @@
    int matchlen;
    
    matchlen = mutt_strlen (dest);
 -  for (mailbox = Incoming; mailbox->next; mailbox = mailbox->next)
 +  for (mailbox = Incoming; mailbox && mailbox->next; mailbox = mailbox->next)
    {
      if (!mutt_strncmp (dest, mailbox->path, matchlen))
      {