aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmime/mime_parser.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-11-20 11:03:45 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-11-20 11:03:45 +0000
commitcb5fa030df56eb424d832b99009816989072124c (patch)
tree5d9d701a5e3df984ee9bebd06c209fa310d11acc /src/libmime/mime_parser.c
parentb30c5df0ca6dbe0223789db2f1b0c66a49e2b377 (diff)
downloadrspamd-cb5fa030df56eb424d832b99009816989072124c.tar.gz
rspamd-cb5fa030df56eb424d832b99009816989072124c.zip
[Minor] Fix off-by-one read
Diffstat (limited to 'src/libmime/mime_parser.c')
-rw-r--r--src/libmime/mime_parser.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libmime/mime_parser.c b/src/libmime/mime_parser.c
index 0b682879d..5d4ab9f7c 100644
--- a/src/libmime/mime_parser.c
+++ b/src/libmime/mime_parser.c
@@ -1005,7 +1005,7 @@ rspamd_mime_preprocess_cb (struct rspamd_multipattern *mp,
bend++;
/* \r\n */
- if (*bend == '\n') {
+ if (bend < end && *bend == '\n') {
bend++;
}
}