From: Vsevolod Stakhov Date: Wed, 25 Sep 2019 09:13:48 +0000 (+0100) Subject: [Minor] Some sanity check X-Git-Tag: 2.0~134 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=817a42ec5ed9ef52a8ab5fade2440360d2dad470;p=rspamd.git [Minor] Some sanity check --- diff --git a/src/libmime/mime_headers.c b/src/libmime/mime_headers.c index 085dd3313..26c4165f8 100644 --- a/src/libmime/mime_headers.c +++ b/src/libmime/mime_headers.c @@ -260,7 +260,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 {