diff options
author | default <nobody@localhost> | 2023-07-18 09:59:16 +0200 |
---|---|---|
committer | default <nobody@localhost> | 2023-07-18 09:59:16 +0200 |
commit | 2700567fca4b8830d567151d9b849ecf6b3bfc91 (patch) | |
tree | 0c06130d760f8e537ec95f56fea3612163aaea71 | |
parent | 6e5c7d4a4be51b955a6910cc5dda74123317ad65 (diff) |
Avoid too deep nesting of html_entry().
-rw-r--r-- | html.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -836,6 +836,10 @@ xs_str *html_entry(snac *snac, xs_str *os, const xs_dict *msg, int local, if (is_hidden(snac, id)) return os; + /* avoid too deep nesting, as it may be a loop */ + if (level >= 256) + return os; + xs *s = xs_str_new("<div>\n"); { |