commit 2700567fca4b8830d567151d9b849ecf6b3bfc91
parent 6e5c7d4a4be51b955a6910cc5dda74123317ad65
Author: default <nobody@localhost>
Date: Tue, 18 Jul 2023 09:59:16 +0200
Avoid too deep nesting of html_entry().
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git 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,
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");
{