Replace mh_xmalloc() with mh_xcalloc()
[mmh] / sbr / encode_rfc2047.c
index 852c261..844f0c4 100644 (file)
@@ -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') {