From c03ff5a3570a0dfbc59f2b9df7782e487f98a796 Mon Sep 17 00:00:00 2001 From: Tatsuya Kinoshita Date: Tue, 22 Nov 2016 00:12:19 +0900 Subject: New patch 926_indent-level.patch to fix stack overflow --- debian/patches/926_indent-level.patch | 18 ++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 19 insertions(+) create mode 100644 debian/patches/926_indent-level.patch (limited to 'debian/patches') 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 +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 -- cgit v1.2.3