X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=mutt_sasl.c;h=c52865bca9964878b90a583808283bd6759794e6;hp=757f316c7c071e16fc932db31e08ed94ff72bc90;hb=d10e9217f2111d9d4354cf867ecdc783a6585e76;hpb=df70e07e24add1869bcc9b7af2277d9d0c09a281;ds=sidebyside diff --git a/mutt_sasl.c b/mutt_sasl.c index 757f316..c52865b 100644 --- a/mutt_sasl.c +++ b/mutt_sasl.c @@ -1,19 +1,10 @@ /* + * Copyright notice from original mutt: * Copyright (C) 2000-5 Brendan Cully - * - * 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;