Subject: Check indent_level to prevent infinite recursion Author: Tatsuya Kinoshita Bug-Debian: https://github.com/tats/w3m/issues/37 [CVE-2016-9626] 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);