commit 0eb055f: [Minor] Fix overflow tags parsing

Vsevolod Stakhov vsevolod at highsecure.ru
Tue Jul 27 19:21:05 UTC 2021


Author: Vsevolod Stakhov
Date: 2021-07-27 20:15:04 +0100
URL: https://github.com/rspamd/rspamd/commit/0eb055f6163508bcd0c80546bce1e92e9d4e3817

[Minor] Fix overflow tags parsing

---
 src/libserver/html/html.cxx | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/libserver/html/html.cxx b/src/libserver/html/html.cxx
index ab49d147b..9c96f2bb9 100644
--- a/src/libserver/html/html.cxx
+++ b/src/libserver/html/html.cxx
@@ -1875,7 +1875,7 @@ html_process_input(rspamd_mempool_t *pool,
 			msg_warn_pool("tags limit of %d tags is reached at the position %d;"
 						  " ignoring the rest of the HTML content",
 					(int) hc->all_tags.size(), (int) (p - start));
-			html_append_parsed(hc, {p, (std::size_t) (end - p)}, false);
+			c = p;
 			p = end;
 			break;
 		}
@@ -1957,6 +1957,9 @@ html_process_input(rspamd_mempool_t *pool,
 			process_opening_tag();
 		}
 		break;
+	case tags_limit_overflow:
+		html_append_parsed(hc, {c, (std::size_t) (end - c)}, false);
+		break;
 	default:
 		/* Do nothing */
 		break;


More information about the Commits mailing list