aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTatsuya Kinoshita <tats@debian.org>2016-11-09 13:55:34 +0000
committerTatsuya Kinoshita <tats@debian.org>2016-11-09 14:30:32 +0000
commite458def067859615ce4bc7170733d368f49d63c2 (patch)
tree3fdf0c5b58754270a7142839851fdc1fbb17b96a
parentUpdate ChangeLog (diff)
downloadw3m-e458def067859615ce4bc7170733d368f49d63c2.tar.gz
w3m-e458def067859615ce4bc7170733d368f49d63c2.zip
Check indent_level to prevent infinite recursion
Bug-Debian: https://github.com/tats/w3m/issues/37
-rw-r--r--table.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/table.c b/table.c
index d88e983..33593b1 100644
--- a/table.c
+++ b/table.c
@@ -2326,6 +2326,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);