diff options
| author | 2024-03-08 05:41:08 +0100 | |
|---|---|---|
| committer | 2024-03-08 05:41:08 +0100 | |
| commit | 093f4af2827dab26785e788dc0d49d54308239b5 (patch) | |
| tree | 8b11d7bf94934136bf886a7522d22f4c16a0a355 /html.c | |
| parent | Bumped version. (diff) | |
| download | snac2-093f4af2827dab26785e788dc0d49d54308239b5.tar.gz snac2-093f4af2827dab26785e788dc0d49d54308239b5.tar.xz snac2-093f4af2827dab26785e788dc0d49d54308239b5.zip | |
Shortened the maximum conversation levels.
Set to a compilation define in MAX_CONVERSATION_LEVELS.
Diffstat (limited to 'html.c')
| -rw-r--r-- | html.c | 5 |
1 files changed, 3 insertions, 2 deletions
| @@ -1334,8 +1334,9 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only, | |||
| 1334 | } | 1334 | } |
| 1335 | 1335 | ||
| 1336 | /* avoid too deep nesting, as it may be a loop */ | 1336 | /* avoid too deep nesting, as it may be a loop */ |
| 1337 | if (level >= 256) | 1337 | if (level >= MAX_CONVERSATION_LEVELS) |
| 1338 | return NULL; | 1338 | return xs_html_tag("mark", |
| 1339 | xs_html_text(L("Truncated (too deep)"))); | ||
| 1339 | 1340 | ||
| 1340 | if (strcmp(type, "Follow") == 0) { | 1341 | if (strcmp(type, "Follow") == 0) { |
| 1341 | return xs_html_tag("div", | 1342 | return xs_html_tag("div", |