From: Vsevolod Stakhov Date: Wed, 25 Sep 2019 15:39:29 +0000 (+0100) Subject: [Minor] Copy&paste fix for copy&paste OOB access X-Git-Tag: 2.0~125 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c8eb8b4eea971c5b00e02e3e0cb16c8987a76b93;p=rspamd.git [Minor] Copy&paste fix for copy&paste OOB access --- 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 {