diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-04-27 17:03:41 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-04-27 17:03:41 +0100 |
commit | 026b6b09d0666ddc6d3359b4a73f074b061e0da7 (patch) | |
tree | 11394085dd2931e3ba3e44926a5540ad795cfd98 /src/libmime/mime_parser.c | |
parent | 3ff27cd87afb23252c734d8c463b05492f72f3c2 (diff) | |
download | rspamd-026b6b09d0666ddc6d3359b4a73f074b061e0da7.tar.gz rspamd-026b6b09d0666ddc6d3359b4a73f074b061e0da7.zip |
[Minor] One more fix for spaces at the end of boundary
Diffstat (limited to 'src/libmime/mime_parser.c')
-rw-r--r-- | src/libmime/mime_parser.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/libmime/mime_parser.c b/src/libmime/mime_parser.c index 4038f59c6..590ee57d6 100644 --- a/src/libmime/mime_parser.c +++ b/src/libmime/mime_parser.c @@ -1108,19 +1108,26 @@ rspamd_mime_preprocess_cb (struct rspamd_multipattern *mp, bend ++; } - if (bend < end) { + while (bend < end) { if (*bend == '\r') { - bend++; + bend ++; /* \r\n */ if (bend < end && *bend == '\n') { - bend++; + bend ++; } } - else { + else if (*bend == '\n') { /* \n */ - bend++; + bend ++; } + else if (g_ascii_isspace (*bend)){ + /* Spaces in the same line, skip them */ + bend ++; + continue; + } + + break; } b.boundary = p - st->start - 2; |