X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=sbr%2Fencode_rfc2047.c;fp=sbr%2Fencode_rfc2047.c;h=844f0c46686f5af3258077b690fb00266b672df8;hp=852c26135ad275d24748e4179d5234fd30994d53;hb=10eff860a28b96582526eb739fd0a55441669938;hpb=d6742b1bb19c7eca8488402484a6e4f55543d789 diff --git a/sbr/encode_rfc2047.c b/sbr/encode_rfc2047.c index 852c261..844f0c4 100644 --- a/sbr/encode_rfc2047.c +++ b/sbr/encode_rfc2047.c @@ -204,7 +204,7 @@ field_encode_quoted(const char *name, char **value, const char *charset, ** least one) until we get to the actual ** text. Copy until we get to a non-space. */ - output = mh_xmalloc(outlen); + output = mh_xcalloc(outlen, sizeof(char)); q = output; while (is_fws(*p)) { *q++ = *p++; @@ -340,7 +340,7 @@ utf8len(const char *p) static void unfold_header(char **value, int len) { - char *str = mh_xmalloc(len + 1); + char *str = mh_xcalloc(len + 1, sizeof(char)); char *p = str, *q = *value; while (*q != '\0') {