]> granicus.if.org Git - neomutt/commit
Fix IMAP segfault due to NULL capstr.
authorKevin McCarthy <kevin@8t8.us>
Fri, 26 Jun 2015 19:23:26 +0000 (12:23 -0700)
committerKevin McCarthy <kevin@8t8.us>
Fri, 26 Jun 2015 19:23:26 +0000 (12:23 -0700)
commit0ebf60fcc3e33ca5ee0c88ef2b0f3fda7a7a3e9c
tree94bf6b89be7dc2a2bbf7c026689bcec03755b06a
parent80704a1be798b5ea8ec3986b23b556d9d4dfd924
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.
imap/auth_sasl.c
imap/imap.c