]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix overflow tags parsing
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 27 Jul 2021 19:15:04 +0000 (20:15 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 27 Jul 2021 19:15:04 +0000 (20:15 +0100)
src/libserver/html/html.cxx

index ab49d147bfe39335e29442f4c27f31cabbbe7b73..9c96f2bb9df05ffe70982532fa417d688228e256 100644 (file)
@@ -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;