Nico Golde:
[apps/madmutt.git] / mutt_sasl.c
index 757f316..c52865b 100644 (file)
@@ -1,19 +1,10 @@
 /*
+ * Copyright notice from original mutt:
  * Copyright (C) 2000-5 Brendan Cully <brendan@kublai.com>
- * 
- *     This program is free software; you can redistribute it and/or modify
- *     it under the terms of the GNU General Public License as published by
- *     the Free Software Foundation; either version 2 of the License, or
- *     (at your option) any later version.
- * 
- *     This program is distributed in the hope that it will be useful,
- *     but WITHOUT ANY WARRANTY; without even the implied warranty of
- *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *     GNU General Public License for more details.
- * 
- *     You should have received a copy of the GNU General Public License
- *     along with this program; if not, write to the Free Software
- *     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ *
+ * This file is part of mutt-ng, see http://www.muttng.org/.
+ * It's licensed under the GNU General Public License,
+ * please see the file GPL in the top level source directory.
  */
 
 /* common SASL helper routines */
@@ -138,7 +129,7 @@ static int iptostring (const struct sockaddr *addr, socklen_t addrlen,
   if (ret)
     return getnameinfo_err (ret);
 
-  if (outlen < strlen (hbuf) + strlen (pbuf) + 2)
+  if (outlen < mutt_strlen (hbuf) + mutt_strlen (pbuf) + 2)
     return SASL_BUFOVER;
 
   snprintf (out, outlen, "%s;%s", hbuf, pbuf);
@@ -508,7 +499,7 @@ static int mutt_sasl_cb_authname (void *context, int id, const char **result,
   *result = account->user;
 
   if (len)
-    *len = strlen (*result);
+    *len = mutt_strlen (*result);
 
   return SASL_OK;
 }
@@ -529,7 +520,7 @@ static int mutt_sasl_cb_pass (sasl_conn_t * conn, void *context, int id,
   if (mutt_account_getpass (account))
     return SASL_FAIL;
 
-  len = strlen (account->pass);
+  len = mutt_strlen (account->pass);
 
   *psecret = (sasl_secret_t *) safe_malloc (sizeof (sasl_secret_t) + len);
   (*psecret)->len = len;