X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=mutt_sasl.c;h=699e67705949cb40a90e3b49666c5ef80a2a3a81;hp=da5ac5f14ef0bd952cbd073743793d3c1f618695;hb=0dd6b2e7a21a844f2dcc306bb2d36096d3f9b664;hpb=8e037c67a88cb4680c4391134c578e3b55a80f8a diff --git a/mutt_sasl.c b/mutt_sasl.c index da5ac5f..699e677 100644 --- a/mutt_sasl.c +++ b/mutt_sasl.c @@ -20,7 +20,6 @@ #include "mutt_sasl.h" #include "mutt_socket.h" -#include "lib/mem.h" #include "lib/debug.h" #include @@ -117,7 +116,7 @@ static int iptostring (const struct sockaddr *addr, socklen_t addrlen, if (ret) return getnameinfo_err (ret); - if (outlen < str_len (hbuf) + str_len (pbuf) + 2) + if (outlen < m_strlen(hbuf) + m_strlen(pbuf) + 2) return SASL_BUFOVER; snprintf (out, outlen, "%s;%s", hbuf, pbuf); @@ -258,7 +257,7 @@ int mutt_sasl_client_new (CONNECTION * conn, sasl_conn_t ** saslconn) * just fall back to LOGIN in the IMAP case anyway. If that doesn't * work for POP, we can make it a flag or move this code into * imap/auth_sasl.c */ - memset (&secprops, 0, sizeof (secprops)); + p_clear(&secprops, 1); /* Work around a casting bug in the SASL krb4 module */ secprops.max_ssf = 0x7fff; secprops.maxbufsize = M_SASL_MAXBUF; @@ -332,7 +331,7 @@ int mutt_sasl_interact (sasl_interact_t * interaction) if (mutt_get_field (prompt, resp, sizeof (resp), 0)) return SASL_FAIL; - interaction->len = str_len (resp) + 1; + interaction->len = m_strlen(resp) + 1; interaction->result = p_dupstr(resp, interaction->len - 1); interaction++; } @@ -430,7 +429,7 @@ static int mutt_sasl_cb_authname (void *context, int id, const char **result, } if (len) - *len = str_len (*result); + *len = m_strlen(*result); return SASL_OK; } @@ -450,7 +449,7 @@ static int mutt_sasl_cb_pass (sasl_conn_t * conn, void *context, int id, if (mutt_account_getpass (account)) return SASL_FAIL; - len = str_len (account->pass); + len = m_strlen(account->pass); *psecret = xmalloc(sizeof(sasl_secret_t) + len); (*psecret)->len = len;