mblaze

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

commit fc4e4af774d020b9e191ac50faabcba0027dd27a
parent cc7ab258141f91e49d66cde589f26e2e94d9e516
Author: Leah Neukirchen <leah@vuxu.org>
Date:   Mon, 19 Jun 2017 13:26:40 +0200

mmime: don't generate empty filenames

Diffstat:
mmime.c | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/mmime.c b/mmime.c @@ -120,6 +120,11 @@ gen_attachment(const char *filename, char *content_disposition) const char *s = filename; int quote = 0; + if (!*filename) { + printf("Content-Disposition: %s\n", content_disposition); + return; + } + for (s = (char *) filename; *s; s++) { if (*s < 32 || *s == '"' || *s >= 127 || s - filename > 35) goto rfc2231;