diff options
author | Tatsuya Kinoshita <tats@debian.org> | 2021-04-03 10:40:24 +0000 |
---|---|---|
committer | Tatsuya Kinoshita <tats@debian.org> | 2021-04-03 10:40:24 +0000 |
commit | 58b26000a214d64f6b3ee1522cbbd7a4e07080a0 (patch) | |
tree | 6ea40276e78db668807a4ed5246a899eba255670 /file.c | |
parent | Update ChangeLog (diff) | |
download | w3m-58b26000a214d64f6b3ee1522cbbd7a4e07080a0.tar.gz w3m-58b26000a214d64f6b3ee1522cbbd7a4e07080a0.zip |
Limit size and number of tables to prevent integer overflow
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -5107,9 +5107,9 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env) return 1; case HTML_TABLE: close_anchor(h_env, obuf); - obuf->table_level++; - if (obuf->table_level >= MAX_TABLE) + if (obuf->table_level + 1 >= MAX_TABLE) break; + obuf->table_level++; w = BORDER_NONE; /* x: cellspacing, y: cellpadding */ x = 2; |