aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmime/message.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-03-25 10:23:37 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-03-25 10:23:37 +0000
commit70c783d20f97f3283154a339e6514e7f51d9a3b6 (patch)
tree88124b029d33c39fec2980e4030bd1de010e1084 /src/libmime/message.c
parent18a8bed20e5b4baa5a967678977710b379c6a865 (diff)
downloadrspamd-70c783d20f97f3283154a339e6514e7f51d9a3b6.tar.gz
rspamd-70c783d20f97f3283154a339e6514e7f51d9a3b6.zip
[Minor] Fix oob read
Diffstat (limited to 'src/libmime/message.c')
-rw-r--r--src/libmime/message.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libmime/message.c b/src/libmime/message.c
index 99b84e385..8a9601fa7 100644
--- a/src/libmime/message.c
+++ b/src/libmime/message.c
@@ -467,7 +467,7 @@ rspamd_strip_newlines_parse (struct rspamd_task *task,
if (G_UNLIKELY (*c) == ' ') {
part->spaces ++;
- if (*(c - 1) == ' ') {
+ if (c > begin && *(c - 1) == ' ') {
part->double_spaces ++;
}
}