diff options
author | Tatsuya Kinoshita <tats@debian.org> | 2016-08-16 13:19:55 +0000 |
---|---|---|
committer | Tatsuya Kinoshita <tats@debian.org> | 2016-08-16 13:19:55 +0000 |
commit | 431774963927a55430e5f5ca217a3fffd558bc19 (patch) | |
tree | f806a5ab86df96c57ecdc98a1dcdf4f09619854f | |
parent | Update ChangeLog (diff) | |
download | w3m-431774963927a55430e5f5ca217a3fffd558bc19.tar.gz w3m-431774963927a55430e5f5ca217a3fffd558bc19.zip |
Truncate large values of table attributes
Bug-Debian: https://github.com/tats/w3m/issues/11
Diffstat (limited to '')
-rw-r--r-- | file.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -4998,9 +4998,18 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env) } if (parsedtag_exists(tag, ATTR_HBORDER)) w = BORDER_NOWIN; +#define MAX_CELLSPACING 1000 +#define MAX_CELLPADDING 1000 +#define MAX_VSPACE 1000 parsedtag_get_value(tag, ATTR_CELLSPACING, &x); parsedtag_get_value(tag, ATTR_CELLPADDING, &y); parsedtag_get_value(tag, ATTR_VSPACE, &z); + if (x > MAX_CELLSPACING) + x = MAX_CELLSPACING; + if (y > MAX_CELLPADDING) + y = MAX_CELLPADDING; + if (z > MAX_VSPACE) + z = MAX_VSPACE; #ifdef ID_EXT parsedtag_get_value(tag, ATTR_ID, &id); #endif /* ID_EXT */ |