]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Some sanity check
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 25 Sep 2019 09:13:48 +0000 (10:13 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 25 Sep 2019 09:13:48 +0000 (10:13 +0100)
src/libmime/mime_headers.c

index 085dd3313293fde0ab3f33da86fbfced6f1c4646..26c4165f80708badd3c3161c612dfa3bfcc8e421 100644 (file)
@@ -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 {