diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-03-31 11:25:16 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-03-31 11:25:53 +0100 |
commit | 356d8cfe5fabfe8febf829b6a2640100c53b450c (patch) | |
tree | c7b84657c81b1d70b5b1faabf1a6ff49b02d971b /src/libmime/mime_headers.c | |
parent | 1471922ed2ab6e72e2c5f5f66121624ede4418d5 (diff) | |
download | rspamd-356d8cfe5fabfe8febf829b6a2640100c53b450c.tar.gz rspamd-356d8cfe5fabfe8febf829b6a2640100c53b450c.zip |
[Minor] Try to fix OOB reads
Diffstat (limited to 'src/libmime/mime_headers.c')
-rw-r--r-- | src/libmime/mime_headers.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libmime/mime_headers.c b/src/libmime/mime_headers.c index aed7575eb..582f11d7a 100644 --- a/src/libmime/mime_headers.c +++ b/src/libmime/mime_headers.c @@ -366,7 +366,7 @@ rspamd_mime_headers_process (struct rspamd_task *task, } } /* Strip last space that can be added by \r\n parsing */ - if (*(tp - 1) == ' ') { + if (tp > tmp && *(tp - 1) == ' ') { tp--; } |