Fix spelling and encoding errors in manpages and an error message
[mmh] / sbr / fmt_rfc2047.c
index faa3cc2..4145139 100644 (file)
@@ -209,7 +209,7 @@ decode_rfc2047(char *str, char *dst, size_t dstlen)
                        if (use_iconv) {
                                saveq = q;
                                savedstlen = dstlen;
-                               q = convbuf = (char *) mh_xmalloc(endofmime - startofmime);
+                               q = convbuf = mh_xcalloc(endofmime - startofmime, sizeof(char));
                        }
 /*
 ** ADDCHR2 is for adding characters when q is or might be convbuf:
@@ -337,7 +337,7 @@ decode_rfc2047(char *str, char *dst, size_t dstlen)
                                if (!dstlen || !savedstlen)
                                        goto buffull;
                                dstlen = savedstlen;
-                               free(convbuf);
+                               mh_free0(&convbuf);
                        }
 #endif