get_imap_response() doesn't necessarily set the content of a non-NULL
`char **status'. Do this before calling, and check if it's been set to
non-NULL before using upon return.
*/
case NETSEC_SASL_FINISH:
+ line = NULL;
if (get_imap_response(nsc, NULL, NULL, &line, 1, errstr) != OK)
return NOTOK;
/*
* parse it.
*/
- if (has_prefix(line, "OK [CAPABILITY ")) {
+ if (line && has_prefix(line, "OK [CAPABILITY ")) {
char *p = line + 15, *q;
q = strchr(p, ']');