aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmime/mime_headers.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-09-25 16:39:29 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-09-25 16:39:29 +0100
commitc8eb8b4eea971c5b00e02e3e0cb16c8987a76b93 (patch)
treeaa7ce5f64e4ba915c3d265578ee7d7830a2613ec /src/libmime/mime_headers.c
parent6e17fc9600d13f16c862d0c367ca09ed8c04dbe3 (diff)
downloadrspamd-c8eb8b4eea971c5b00e02e3e0cb16c8987a76b93.tar.gz
rspamd-c8eb8b4eea971c5b00e02e3e0cb16c8987a76b93.zip
[Minor] Copy&paste fix for copy&paste OOB access
Diffstat (limited to 'src/libmime/mime_headers.c')
-rw-r--r--src/libmime/mime_headers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libmime/mime_headers.c b/src/libmime/mime_headers.c
index 26c4165f8..f1bea0d61 100644
--- a/src/libmime/mime_headers.c
+++ b/src/libmime/mime_headers.c
@@ -299,7 +299,7 @@ rspamd_mime_headers_process (struct rspamd_task *task,
if (*p == '\n') {
nlines_count[RSPAMD_TASK_NEWLINES_LF] ++;
}
- else if (*(p + 1) == '\n') {
+ else if (p + 1 < end && *(p + 1) == '\n') {
nlines_count[RSPAMD_TASK_NEWLINES_CRLF] ++;
}
else {