commit 817a42e: [Minor] Some sanity check

Vsevolod Stakhov vsevolod at highsecure.ru
Wed Sep 25 09:14:09 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-09-25 10:13:48 +0100
URL: https://github.com/rspamd/rspamd/commit/817a42ec5ed9ef52a8ab5fade2440360d2dad470 (HEAD -> master)

[Minor] Some sanity check

---
 src/libmime/mime_headers.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 {


More information about the Commits mailing list