diff options
Diffstat (limited to 'mailinfo.c')
| -rw-r--r-- | mailinfo.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mailinfo.c b/mailinfo.c index 99ac596e09..13949ff31e 100644 --- a/mailinfo.c +++ b/mailinfo.c @@ -470,7 +470,7 @@ static int convert_to_utf8(struct mailinfo *mi, return error("cannot convert from %s to %s", charset, mi->metainfo_charset); } - strbuf_attach(line, out, out_len, out_len); + strbuf_attach(line, out, out_len, out_len + 1); return 0; } @@ -1141,7 +1141,7 @@ static void output_header_lines(FILE *fout, const char *hdr, const struct strbuf { const char *sp = data->buf; while (1) { - char *ep = strchr(sp, '\n'); + const char *ep = strchr(sp, '\n'); int len; if (!ep) len = strlen(sp); |
