mblaze

Unix utilities to deal with Maildir - my mirror
git clone https://pi.duncano.de/git/mblaze.git
Log | Files | Refs | README | COPYING

commit 856883bf69bb54827c0854546131da39bef469f7
parent cbe0a0f9553efc3dfc0d4703107cc1d02cc2d06c
Author: Leah Neukirchen <leah@vuxu.org>
Date:   Mon, 19 Jun 2017 13:35:39 +0200

mdeliver: don't increment line buffer of getdelim

Diffstat:
mdeliver.c | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/mdeliver.c b/mdeliver.c @@ -105,6 +105,7 @@ tryagain: return -1; break; } + char *line_start = line; if (line[0] == '\n' && !line[1]) in_header = 0; @@ -131,12 +132,12 @@ tryagain: while (*s == '>') s++; if (strncmp("From ", s, 5) == 0) { - line++; + line_start++; rd--; } } - if (fwrite(line, 1, rd, outfile) != (size_t)rd) + if (fwrite(line_start, 1, rd, outfile) != (size_t)rd) return -1; } if (fflush(outfile) == EOF)