aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2019-02-28 13:20:19 +0100
committerLeah Neukirchen <leah@vuxu.org>2019-02-28 13:20:19 +0100
commit3a97df9990c2a2d5cda371aefe52c8bc8b4accae (patch)
treeec62f3aa98cc0eb5eaa8752e20190297698813d3
parent01b2f1abc688516c2249981a16c95fba01e2a18b (diff)
downloadmblaze-3a97df9990c2a2d5cda371aefe52c8bc8b4accae.tar.gz
mmime: print_header: fix for empty lines
-rw-r--r--mmime.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mmime.c b/mmime.c
index 6f25819..6188f5b 100644
--- a/mmime.c
+++ b/mmime.c
@@ -282,6 +282,9 @@ print_header(char *line) {
char *s, *e;
size_t l = strlen(line);
+ if (l == 0)
+ return;
+
if (line[l-1] == '\n')
line[l-1] = 0;