X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=rfc2231.c;h=3c0f097119c32d76c3ba89877a006ee7e672f478;hp=15da1f1326d7e81b96a1a4f562549d1c68c4c558;hb=be3bd578d8557b8d0cb9138153ee30e14b33ec58;hpb=74a2265af51ce89bca845adc1d68f273c9933c13 diff --git a/rfc2231.c b/rfc2231.c index 15da1f1..3c0f097 100644 --- a/rfc2231.c +++ b/rfc2231.c @@ -24,6 +24,7 @@ #include "mutt.h" #include "mime.h" #include "charset.h" +#include "lib/str.h" #include "rfc2047.h" #include "rfc2231.h" @@ -229,7 +230,7 @@ static void rfc2231_list_insert (struct rfc2231_parameter **list, q = p; p = p->next; - c = strcmp (par->value, q->value); + c = safe_strcmp (par->value, q->value); if ((c > 0) || (c == 0 && par->index >= q->index)) break; } @@ -268,7 +269,7 @@ static void rfc2231_join_continuations (PARAMETER ** head, if (encoded && par->encoded) rfc2231_decode_one (par->value, valp); - vl = mutt_strlen (par->value); + vl = safe_strlen (par->value); safe_realloc (&value, l + vl + 1); strcpy (value + l, par->value); /* __STRCPY_CHECKED__ */ @@ -278,7 +279,7 @@ static void rfc2231_join_continuations (PARAMETER ** head, rfc2231_free_parameter (&par); if ((par = q)) valp = par->value; - } while (par && !strcmp (par->attribute, attribute)); + } while (par && !safe_strcmp (par->attribute, attribute)); if (value) { if (encoded) @@ -313,10 +314,10 @@ int rfc2231_encode_string (char **pd) if (!Charset || !SendCharset || !(charset = mutt_choose_charset (Charset, SendCharset, - *pd, mutt_strlen (*pd), &d, &dlen))) { + *pd, safe_strlen (*pd), &d, &dlen))) { charset = safe_strdup (Charset ? Charset : "unknown-8bit"); d = *pd; - dlen = mutt_strlen (d); + dlen = safe_strlen (d); } if (!mutt_is_us_ascii (charset)) @@ -329,9 +330,9 @@ int rfc2231_encode_string (char **pd) ++ext; if (encode) { - e = safe_malloc (dlen + 2 * ext + mutt_strlen (charset) + 3); + e = safe_malloc (dlen + 2 * ext + safe_strlen (charset) + 3); sprintf (e, "%s''", charset); /* __SPRINTF_CHECKED__ */ - t = e + mutt_strlen (e); + t = e + safe_strlen (e); for (s = d, slen = dlen; slen; s++, slen--) if (*s < 0x20 || *s >= 0x7f || strchr (MimeSpecials, *s) || strchr ("*'%", *s)) {