mutt stable branch with some hacks
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix IMAP segfault due to NULL capstr.

After a failed login, the connection is left open but capstr is freed.
If a second login attempt is made, imap_auth_sasl was trying to strstr
using the NULL capstr.

Add a NONULL around the capstr parameter to strstr. Change
imap_conn_find() to keep the capstr around until a successful
authentication occurs.

+2 -3
+1 -1
imap/auth_sasl.c
··· 70 70 rc = sasl_client_start (saslconn, "AUTH=ANONYMOUS", NULL, &pc, &olen, 71 71 &mech); 72 72 } else if (!ascii_strcasecmp ("login", method) && 73 - !strstr (idata->capstr, "AUTH=LOGIN")) 73 + !strstr (NONULL (idata->capstr), "AUTH=LOGIN")) 74 74 /* do not use SASL login for regular IMAP login (#3556) */ 75 75 return IMAP_AUTH_UNAVAIL; 76 76
+1 -2
imap/imap.c
··· 373 373 if (!imap_authenticate (idata)) 374 374 { 375 375 idata->state = IMAP_AUTHENTICATED; 376 + FREE (&idata->capstr); 376 377 new = 1; 377 378 if (idata->conn->ssf) 378 379 dprint (2, (debugfile, "Communication encrypted at %d bits\n", ··· 380 381 } 381 382 else 382 383 mutt_account_unsetpass (&idata->conn->account); 383 - 384 - FREE (&idata->capstr); 385 384 } 386 385 if (new && idata->state == IMAP_AUTHENTICATED) 387 386 {