commit f1d44f1: [Minor] Add one more boundary check

Vsevolod Stakhov vsevolod at highsecure.ru
Mon Jun 8 16:14:17 UTC 2020


Author: Vsevolod Stakhov
Date: 2020-06-08 17:09:41 +0100
URL: https://github.com/rspamd/rspamd/commit/f1d44f1b36c2f6767cbace2aeba7d84a0a99d1f0 (HEAD -> master)

[Minor] Add one more boundary check

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

diff --git a/src/libserver/html.c b/src/libserver/html.c
index 16f108ecf..37c8858bd 100644
--- a/src/libserver/html.c
+++ b/src/libserver/html.c
@@ -368,7 +368,7 @@ rspamd_html_decode_entitles_inplace (gchar *s, gsize len)
 
 	end = s + l;
 
-	while (h - s < l) {
+	while (h - s < l && t <= h) {
 		switch (state) {
 		/* Out of entity */
 		case 0:


More information about the Commits mailing list