In regard to: Re: two mailutil segfaults with 2002e or 2004a, Mark Crispin...:

In one of those crashes, what is in ap->stream->user_flags[0] ?

My guess is that it is a null pointer, and that somehow a keyword flag got set in the message without any keywords being defined.

If, in fact, that is the case, I'll send you a patch.

That is in fact the case, for both folders:

(gdb) run
Starting program: /usr/local/src/RPM/BUILD/imap-2004a/mailutil/mailutil
move folders/auser auser

Program received signal SIGSEGV, Segmentation fault.
0x402594f1 in strlen () from /lib/i686/libc.so.6
(gdb) where
#0  0x402594f1 in strlen () from /lib/i686/libc.so.6
#1  0x0804d680 in mm_append (stream=0x8132738, data=0xbffeb8c0,
    flags=0xbffeb3b0, date=0xbffeb3ac, message=0xbffea710) at
mailutil.c:488
#2  0x0809f569 in mbx_append (stream=0x0, mailbox=0xbffed8fb "auser",
    af=0x804d464 <mm_append>, data=0xbffeb8c0) at mbx.c:1074
#3  0x080618f2 in mail_append_multiple (stream=0x0,
    mailbox=0xbffed8fb "auser", af=0x804d464 <mm_append>, data=0xbffeb8c0)
    at mail.c:2486
#4  0x0804d324 in mbxcopy (source=0x810e688, dest=0x0, dst=0xbffed8fb
"auser",
    create=1, del=1, mode=0) at mailutil.c:435
#5  0x0804c45e in main (argc=4, argv=0xbffec654) at mailutil.c:233
(gdb) up
#1  0x0804d680 in mm_append (stream=0x8132738, data=0xbffeb8c0,
    flags=0xbffeb3b0, date=0xbffeb3ac, message=0xbffea710) at
mailutil.c:488
488           if ((MAILTMPLEN - ((t += strlen (t)) - tmp)) > (long)
(gdb) print ap->stream->user_flags[0]
$1 = 0x0


(gdb) set args move folders/MiscSaved MiscSaved (gdb) run Starting program: /usr/local/src/RPM/BUILD/imap-2004a/mailutil/mailutil move folders/MiscSaved MiscSaved

Program received signal SIGSEGV, Segmentation fault.
0x402594f1 in strlen () from /lib/i686/libc.so.6
(gdb) up
#1  0x0804d680 in mm_append (stream=0x81303d0, data=0xbffeb1c0,
    flags=0xbffeacb0, date=0xbffeacac, message=0xbffea010) at
mailutil.c:488
488           if ((MAILTMPLEN - ((t += strlen (t)) - tmp)) > (long)
(gdb) print ap->stream->user_flags[0]
$1 = 0x0

Thanks Mark!

Tim
--
Tim Mooney                              [EMAIL PROTECTED]
Information Technology Services         (701) 231-1076 (Voice)
Room 242-J6, IACC Building              (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164

Reply via email to