summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
authorGravatar default2023-07-18 09:59:16 +0200
committerGravatar default2023-07-18 09:59:16 +0200
commit2700567fca4b8830d567151d9b849ecf6b3bfc91 (patch)
tree0c06130d760f8e537ec95f56fea3612163aaea71 /html.c
parentIncreased recursion level for timeline_request(). (diff)
downloadsnac2-2700567fca4b8830d567151d9b849ecf6b3bfc91.tar.gz
snac2-2700567fca4b8830d567151d9b849ecf6b3bfc91.tar.xz
snac2-2700567fca4b8830d567151d9b849ecf6b3bfc91.zip
Avoid too deep nesting of html_entry().
Diffstat (limited to 'html.c')
-rw-r--r--html.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/html.c b/html.c
index e4703d1..8455097 100644
--- a/html.c
+++ b/html.c
@@ -836,6 +836,10 @@ xs_str *html_entry(snac *snac, xs_str *os, const xs_dict *msg, int local,
836 if (is_hidden(snac, id)) 836 if (is_hidden(snac, id))
837 return os; 837 return os;
838 838
839 /* avoid too deep nesting, as it may be a loop */
840 if (level >= 256)
841 return os;
842
839 xs *s = xs_str_new("<div>\n"); 843 xs *s = xs_str_new("<div>\n");
840 844
841 { 845 {