X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;ds=sidebyside;f=sbr%2Fencode_rfc2047.c;h=844f0c46686f5af3258077b690fb00266b672df8;hb=b78007de9802005825390bee71dfce2306b42519;hp=852c26135ad275d24748e4179d5234fd30994d53;hpb=5d690daafbcd4ed26d19610fcc017999ee5af892;p=mmh 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') {