summaryrefslogtreecommitdiffstats
path: root/0008-Fix-out-of-bounds-read-already-fixed-upstream.patch
blob: f79992d855e97ffa4523fd084461d226f421ce9f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From 8f8973aeecd4c3a34efce5cd0a23287cadaf439f Mon Sep 17 00:00:00 2001
From: Georg Sauthoff <mail@georg.so>
Date: Fri, 8 Feb 2019 11:20:19 +0100
Subject: [PATCH 08/11] Fix out-of-bounds read (already fixed upstream)

cf. https://sourceforge.net/p/bogofilter/code/HEAD/tree/trunk/bogofilter/src/lexer.c#l144
---
 src/lexer.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lexer.c b/src/lexer.c
index 0e3e7c7..63bd4cb 100644
--- a/src/lexer.c
+++ b/src/lexer.c
@@ -140,6 +140,7 @@ static int yy_get_new_line(buff_t *buff)
 	   && count != EOF
 /* don't skip if inside message/rfc822 */
 	   && msg_state->parent == NULL
+           && buff->t.leng >= hdrlen
 	   && memcmp(buff->t.u.text,spam_header_name,hdrlen) == 0) {
 	count = skip_folded_line(buff);
     }
-- 
2.20.1