From 2700567fca4b8830d567151d9b849ecf6b3bfc91 Mon Sep 17 00:00:00 2001 From: default Date: Tue, 18 Jul 2023 09:59:16 +0200 Subject: [PATCH] Avoid too deep nesting of html_entry(). --- html.c | 4 ++++ 1 file changed, 4 insertions(+) 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, 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("
\n"); {