aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--debian/patches/926_indent-level.patch18
-rw-r--r--debian/patches/series1
2 files changed, 19 insertions, 0 deletions
diff --git a/debian/patches/926_indent-level.patch b/debian/patches/926_indent-level.patch
new file mode 100644
index 0000000..6d520e9
--- /dev/null
+++ b/debian/patches/926_indent-level.patch
@@ -0,0 +1,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);
diff --git a/debian/patches/series b/debian/patches/series
index 9919121..6c548d1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -61,3 +61,4 @@
923_tagproc.patch
924_curline.patch
925_lineproc.patch
+926_indent-level.patch