commit 2700567

default  ·  2023-07-18 07:59:16 +0000 UTC
parent 6e5c7d4
Avoid too deep nesting of html_entry().
1 files changed,  +4, -0
M html.c
M html.c
+4, -0
 1@@ -836,6 +836,10 @@ xs_str *html_entry(snac *snac, xs_str *os, const xs_dict *msg, int local,
 2     if (is_hidden(snac, id))
 3         return os;
 4 
 5+    /* avoid too deep nesting, as it may be a loop */
 6+    if (level >= 256)
 7+        return os;
 8+
 9     xs *s = xs_str_new("<div>\n");
10 
11     {