mmime: don't generate empty filenames

pull/37/head
Leah Neukirchen 7 years ago
parent cc7ab25814
commit fc4e4af774

@ -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;

Loading…
Cancel
Save