commit 28a7756: [Minor] Fix OOB read

Vsevolod Stakhov vsevolod at highsecure.ru
Thu Sep 26 09:00:06 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-09-26 09:50:31 +0100
URL: https://github.com/rspamd/rspamd/commit/28a7756cb03e43a2e3a0f66acdca27225d509bb9

[Minor] Fix OOB read

---
 src/libserver/url.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libserver/url.c b/src/libserver/url.c
index ec43404f9..1ea68dede 100644
--- a/src/libserver/url.c
+++ b/src/libserver/url.c
@@ -2235,7 +2235,7 @@ url_file_start (struct url_callback_data *cb,
 {
 	match->m_begin = pos;
 
-	if (pos > cb->begin - 1) {
+	if (pos > cb->begin) {
 		match->st = *(pos - 1);
 	}
 	else {


More information about the Commits mailing list