commit a9c4f69: [Minor] Fix tags count calculation
Vsevolod Stakhov
vsevolod at highsecure.ru
Tue Jul 27 19:21:04 UTC 2021
Author: Vsevolod Stakhov
Date: 2021-07-27 20:07:41 +0100
URL: https://github.com/rspamd/rspamd/commit/a9c4f69ca5e17005d8a96af748901a4337b4bc08
[Minor] Fix tags count calculation
---
src/libserver/html/html.cxx | 2 +-
src/libserver/html/html.hxx | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/libserver/html/html.cxx b/src/libserver/html/html.cxx
index 1c9a4c4a1..ab49d147b 100644
--- a/src/libserver/html/html.cxx
+++ b/src/libserver/html/html.cxx
@@ -1283,7 +1283,7 @@ html_process_input(rspamd_mempool_t *pool,
auto new_tag = [&](int flags = 0) -> struct html_tag * {
- if (hc->total_tags > rspamd::html::max_tags) {
+ if (hc->all_tags.size() > rspamd::html::max_tags) {
hc->flags |= RSPAMD_HTML_FLAG_TOO_MANY_TAGS;
return nullptr;
diff --git a/src/libserver/html/html.hxx b/src/libserver/html/html.hxx
index 71399d27d..7e63bedce 100644
--- a/src/libserver/html/html.hxx
+++ b/src/libserver/html/html.hxx
@@ -43,7 +43,6 @@ struct html_content {
struct rspamd_url *base_url = nullptr;
struct html_tag *root_tag = nullptr;
gint flags = 0;
- guint total_tags = 0;
std::vector<bool> tags_seen;
std::vector<html_image *> images;
std::vector<std::unique_ptr<struct html_tag>> all_tags;
More information about the Commits
mailing list