From 216722ed7282cec4338b177ea9ffdd39ad1b8c8c Mon Sep 17 00:00:00 2001 From: Tatsuya Kinoshita Date: Mon, 7 Nov 2016 01:25:49 +0900 Subject: Prevent memory exhausted due to repeat appending "" Bug-Debian: https://github.com/tats/w3m/issues/23 --- file.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/file.c b/file.c index 3315e4f..0ae90bd 100644 --- a/file.c +++ b/file.c @@ -7008,9 +7008,12 @@ completeHTMLstream(struct html_feed_environ *h_env, struct readbuffer *obuf) obuf->table_level = MAX_TABLE - 1; while (obuf->table_level >= 0) { + int tmp = obuf->table_level; table_mode[obuf->table_level].pre_mode &= ~(TBLM_SCRIPT | TBLM_STYLE | TBLM_PLAIN); HTMLlineproc1("", h_env); + if (obuf->table_level >= tmp) + break; } } -- cgit v1.2.3