projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replace mh_xmalloc() with mh_xcalloc()
[mmh]
/
sbr
/
encode_rfc2047.c
diff --git
a/sbr/encode_rfc2047.c
b/sbr/encode_rfc2047.c
index
852c261
..
844f0c4
100644
(file)
--- 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.
*/
** 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++;
q = output;
while (is_fws(*p)) {
*q++ = *p++;
@@
-340,7
+340,7
@@
utf8len(const char *p)
static void
unfold_header(char **value, int len)
{
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') {
char *p = str, *q = *value;
while (*q != '\0') {