X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=mutt_idna.c;h=6c341a6124dcb2118550ee04b085015ce761d7e6;hp=b8bf8fdccf47451a54a011a356a772fd712cabcc;hb=972ceaccdfed1c8c4a665b2ecb9683d140fdeda2;hpb=df70e07e24add1869bcc9b7af2277d9d0c09a281 diff --git a/mutt_idna.c b/mutt_idna.c index b8bf8fd..6c341a6 100644 --- a/mutt_idna.c +++ b/mutt_idna.c @@ -1,19 +1,10 @@ /* + * Copyright notice from original mutt: * Copyright (C) 2003 Thomas Roessler - * - * 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. */ #if HAVE_CONFIG_H @@ -24,6 +15,10 @@ #include "charset.h" #include "mutt_idna.h" +#include "lib/mem.h" +#include "lib/intl.h" +#include "lib/str.h" + /* The low-level interface we use. */ #ifndef HAVE_LIBIDN @@ -162,7 +157,7 @@ int mutt_addrlist_to_idna (ADDRESS * a, char **err) *err = safe_strdup (domain); } else { - safe_realloc (&a->mailbox, mutt_strlen (user) + mutt_strlen (tmp) + 2); + safe_realloc (&a->mailbox, safe_strlen (user) + safe_strlen (tmp) + 2); sprintf (a->mailbox, "%s@%s", NONULL (user), NONULL (tmp)); /* __SPRINTF_CHECKED__ */ } @@ -189,7 +184,7 @@ int mutt_addrlist_to_local (ADDRESS * a) continue; if (mutt_idna_to_local (domain, &tmp, 0) == 0) { - safe_realloc (&a->mailbox, mutt_strlen (user) + mutt_strlen (tmp) + 2); + safe_realloc (&a->mailbox, safe_strlen (user) + safe_strlen (tmp) + 2); sprintf (a->mailbox, "%s@%s", NONULL (user), NONULL (tmp)); /* __SPRINTF_CHECKED__ */ } @@ -223,7 +218,7 @@ const char *mutt_addr_for_display (ADDRESS * a) return a->mailbox; } - safe_realloc (&buff, mutt_strlen (tmp) + mutt_strlen (user) + 2); + safe_realloc (&buff, safe_strlen (tmp) + safe_strlen (user) + 2); sprintf (buff, "%s@%s", NONULL (user), NONULL (tmp)); /* __SPRINTF_CHECKED__ */ FREE (&tmp); FREE (&user);