Skip to content
Snippets Groups Projects
Commit 87c39ce3 authored by rswindell's avatar rswindell
Browse files

Fix bug with MIME-attachment filename parsing when the filename is not

terminated with either a double-quote or a semicolon character. If not
enclosed in quotes, terminate on the first white-space char following the
filename=.
parent 3a99b0b7
No related branches found
No related tags found
No related merge requests found
...@@ -314,8 +314,13 @@ static BOOL mime_getattachment(const char* beg, const char* end, char* attachmen ...@@ -314,8 +314,13 @@ static BOOL mime_getattachment(const char* beg, const char* end, char* attachmen
if(*filename == '"') { if(*filename == '"') {
filename++; filename++;
term = strchr(filename, '"'); term = strchr(filename, '"');
} else } else {
char* wsp = filename;
FIND_WHITESPACE(wsp);
term = strchr(filename, ';'); term = strchr(filename, ';');
if(term > wsp)
term = wsp;
}
if(term == NULL) { if(term == NULL) {
term = filename; term = filename;
FIND_WHITESPACE(term); FIND_WHITESPACE(term);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment