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

[Mutt] #3003: Maildir in expansion function is 0x0 after message send



#3003: Maildir in expansion function is 0x0 after message send

 Change #2977 masks a deeper error in expansion handling.  Here is the use
 case that produces the problem for me:

 Log in to IMAPS account.[[br]]
 Create and send message using Mutt SMTPS client.[[br]]
 Change to =INBOX.Sent directory.[[br]]

 Before the change in response to #2977 this causes the SIGSEGV in
 _mutt_expand_path:

 {{{
 ==== GDB OUTPUT ====

 Program received signal SIGSEGV, Segmentation fault.
 0xb7c1c583 in strlen () from /lib/tls/i686/cmov/libc.so.6
 (gdb) bt
 #0  0xb7c1c583 in strlen () from /lib/tls/i686/cmov/libc.so.6
 #1  0x080b798e in _mutt_expand_path (s=0xbfa84254 "=INBOX", slen=1024,
 rx=0) at muttlib.c:400
 #2  0x080b7cf0 in mutt_expand_path (s=0xbfa84254 "=INBOX", slen=1024) at
 muttlib.c:333
 #3  0x08063e01 in mutt_index_menu () at curs_main.c:1087
 #4  0x08080144 in main (argc=1, argv=0xbfa85184) at main.c:965
 (gdb) up
 #1  0x080b798e in _mutt_expand_path (s=0xbfa84254 "=INBOX", slen=1024,
 rx=0) at muttlib.c:400
 400             if (Maildir[strlen (Maildir) - 1] == '/')
 (gdb) list
 395                 (Maildir[strlen (Maildir) - 1] == '}' ||
 396                  Maildir[strlen (Maildir) - 1] == '/'))
 397               strfcpy (p, NONULL (Maildir), sizeof (p));
 398             else
 399     #endif
 400             if (Maildir[strlen (Maildir) - 1] == '/')
 401               strfcpy (p, NONULL (Maildir), sizeof (p));
 402             else
 403               snprintf (p, sizeof (p), "%s/", NONULL (Maildir));
 404
 (gdb) print Maildir
 $1 = 0x0

 ==== END GDB OUTPUT ====
 }}}

 After that change you simply get "/INBOX.Sent is not a mailbox", which in
 fact it is.  I have the record variable set to "=INBOX.Sent", and the
 messages that I send do end up getting stored there.  I suspect it may be
 related to IMAP support, but I have no real proof at this point.

 The source for Mutt is from HEAD, pulled via Mercurial as indicated at the
 front of this wiki.  Version information from `mutt -v` is attached.

-- 
Ticket URL: <http://dev.mutt.org/trac/ticket/3003>