aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-11-08 16:34:34 +0100
committerChristian Neukirchen <chneukirchen@gmail.com>2016-11-08 16:34:34 +0100
commit2ef903a06547f9461dd6769baf7a19f4dd17dc39 (patch)
tree7efbac6432034a7ec0a4f6a2224407d8959fd399
parent3095d48655b59ecd2f3f162f14a31498ec112937 (diff)
downloadmblaze-2ef903a06547f9461dd6769baf7a19f4dd17dc39.tar.gz
mmime: don't truncate a #type line when it has invalid syntax
-rw-r--r--mmime.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mmime.c b/mmime.c
index 84064b9..4f2dd4f 100644
--- a/mmime.c
+++ b/mmime.c
@@ -298,6 +298,7 @@ gen_build()
if (!rflag && line[0] == '#') {
char *f = strchr(line, ' ');
if (f) {
+ char of = *f;
*f = 0;
if (strchr(line, '/')) {
printf("\n--%s\n", sep);
@@ -307,6 +308,7 @@ gen_build()
intext = 0;
continue;
}
+ *f = of;
}
}