On Mon, Jan 06, Olaf Hering wrote:

> Current HEAD crashes if IMAP login fails. The backtrace is:
> 
> (gdb) bt
> #0  __strstr_sse2 (haystack_start=0x0, needle_start=0x4c0276 "AUTH=LOGIN") at 
> ../string/strstr.c:63
> #1  0x00000000004a76ac in imap_auth_sasl (idata=0x8b6a90, method=0x8daf90 
> "login") at auth_sasl.c:73
> #2  0x00000000004a7355 in imap_authenticate (idata=0x8b6a90) at auth.c:79
> #3  0x00000000004a038c in imap_conn_find (account=0x7fffffffb910, 
> flags=<optimized out>) at imap.c:373
> #4  0x00000000004a05e5 in imap_get_mailbox (path=<optimized out>, 
> hidata=0x7fffffffbad8, buf=0x7fffffffc2e0 "\360\302\377\377\377\177", 
> blen=1024) at imap.c:1443
> #5  0x00000000004a1920 in imap_buffy_check (force=<optimized out>) at 
> imap.c:1485
> #6  0x0000000000410208 in mutt_buffy_check (force=1) at buffy.c:403
> #7  0x000000000041f76a in mutt_index_menu () at curs_main.c:522
> #8  0x000000000043b111 in main (argc=1, argv=<optimized out>) at main.c:1053
> 
> idata->capstr remains unset unless cmd_parse_capability is called. How
> should a failed login be handled to avoid the crash?

Any word on that?

Anmeldung gescheitert...
Program received signal SIGSEGV, Segmentation fault.
__strstr_sse2 (haystack_start=0x0, needle_start=0x4bd8b6 "AUTH=LOGIN") at 
../string/strstr.c:63
63        while (*haystack && *needle)
#0  __strstr_sse2 (haystack_start=0x0, needle_start=0x4bd8b6 "AUTH=LOGIN") at 
../string/strstr.c:63
#1  0x00000000004a45cf in imap_auth_sasl (idata=0x8b7290, method=0x8d0f10 
"login") at auth_sasl.c:73
#2  0x00000000004a42fd in imap_authenticate (idata=idata@entry=0x8b7290) at 
auth.c:79
#3  0x000000000049d49c in imap_conn_find (account=account@entry=0x7fffffffbe70, 
flags=<optimized out>) at imap.c:373
#4  0x000000000049d6dd in imap_get_mailbox (path=path@entry=0x888960 
"imaps://<server>/INBOX", hidata=hidata@entry=0x7fffffffc038, 
buf=buf@entry=0x7fffffffc040 "", blen=1024) at imap.c:1443
#5  0x000000000049ea37 in imap_buffy_check (force=force@entry=1) at imap.c:1485
#6  0x0000000000411311 in mutt_buffy_check (force=force@entry=1) at buffy.c:403
#7  0x000000000042019a in mutt_index_menu () at curs_main.c:522
#8  0x0000000000409a53 in main (argc=1, argv=<optimized out>) at main.c:1059
(gdb) l
58        bool ok = true; /* True if NEEDLE is prefix of HAYSTACK.  */
59
60        /* Determine length of NEEDLE, and in the process, make sure
61           HAYSTACK is at least as long (no point processing all of a long
62           NEEDLE if HAYSTACK is too short).  */
63        while (*haystack && *needle)
64          ok &= *haystack++ == *needle++;
65        if (*needle)
66          return NULL;
67        if (ok)
(gdb) p haystack
$1 = 0x0
(gdb) p needle
$2 = 0x4bd8b6 "AUTH=LOGIN"

Olaf

Reply via email to