commit cb5fa03: [Minor] Fix off-by-one read
Vsevolod Stakhov
vsevolod at highsecure.ru
Wed Nov 20 11:07:05 UTC 2019
Author: Vsevolod Stakhov
Date: 2019-11-20 11:03:45 +0000
URL: https://github.com/rspamd/rspamd/commit/cb5fa030df56eb424d832b99009816989072124c (HEAD -> master)
[Minor] Fix off-by-one read
---
src/libmime/mime_parser.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libmime/mime_parser.c b/src/libmime/mime_parser.c
index 0b682879d..5d4ab9f7c 100644
--- a/src/libmime/mime_parser.c
+++ b/src/libmime/mime_parser.c
@@ -1005,7 +1005,7 @@ rspamd_mime_preprocess_cb (struct rspamd_multipattern *mp,
bend++;
/* \r\n */
- if (*bend == '\n') {
+ if (bend < end && *bend == '\n') {
bend++;
}
}
More information about the Commits
mailing list