aboutsummaryrefslogtreecommitdiffstats
path: root/debian/patches/926_indent-level.patch
blob: 6d520e901277e39d20fa18f04b6cebdfa5f13cda (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Subject: Check indent_level to prevent infinite recursion
Author: Tatsuya Kinoshita <tats@debian.org>
Bug-Debian: https://github.com/tats/w3m/issues/37
Origin: https://anonscm.debian.org/cgit/collab-maint/w3m.git/commit/?id=e458def067859615ce4bc7170733d368f49d63c2

diff --git a/table.c b/table.c
index 1b425db..c57187a 100644
--- a/table.c
+++ b/table.c
@@ -2342,6 +2342,8 @@ feed_table_block_tag(struct table *tbl,
     int offset;
     if (mode->indent_level <= 0 && indent == -1)
 	return;
+    if (mode->indent_level >= CHAR_MAX && indent == 1)
+	return;
     setwidth(tbl, mode);
     feed_table_inline_tag(tbl, line, mode, -1);
     clearcontentssize(tbl, mode);