diff options
author | Tatsuya Kinoshita <tats@debian.org> | 2016-11-06 16:25:49 +0000 |
---|---|---|
committer | Tatsuya Kinoshita <tats@debian.org> | 2016-11-06 16:25:49 +0000 |
commit | 216722ed7282cec4338b177ea9ffdd39ad1b8c8c (patch) | |
tree | d1bdbf2e3dbee360b6a6be411c6c78603b4676d1 | |
parent | Prevent null pointer dereference in HTMLlineproc2body (diff) | |
download | w3m-216722ed7282cec4338b177ea9ffdd39ad1b8c8c.tar.gz w3m-216722ed7282cec4338b177ea9ffdd39ad1b8c8c.zip |
Prevent memory exhausted due to repeat appending "</table>"
Bug-Debian: https://github.com/tats/w3m/issues/23
Diffstat (limited to '')
-rw-r--r-- | file.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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("</table>", h_env); + if (obuf->table_level >= tmp) + break; } } |