]> git.ipfire.org Git - thirdparty/HylaFAX.git/commitdiff
Allow email headers to be folded between field-name and field-body
authorPatrice Fournier <patrice.fournier@ifax.com>
Thu, 5 Jun 2014 21:03:33 +0000 (17:03 -0400)
committerPatrice Fournier <patrice.fournier@ifax.com>
Tue, 30 Jul 2024 01:34:18 +0000 (21:34 -0400)
faxmail/MsgFmt.c++

index 855f53aba95591fc268ee95c7a31d5bf5dae2e68..7144aecae18a9049b6e52b41384a1e2f0e7077d2 100644 (file)
@@ -152,7 +152,9 @@ MsgFmt::parseHeaders(FILE* fd, u_int& lineno)
        if (len > 0 && !isspace(line[0])) { 
            u_int l = 0;
            field = line.token(l, ':');
-           if (field != "" && l < len) {       // record new header
+           if (line[l-1] != ':') {             // invalid header line with no semi-colon
+               field = "";
+           } else if (field != "") {           // record new header
                fields.append(field);
                // skip leading whitespace
                for (; l < len && isspace(line[l]); l++)