diff options
author | Ito Hiroyuki <ZXB01226@nifty.com> | 2010-08-08 10:14:32 +0000 |
---|---|---|
committer | Ito Hiroyuki <ZXB01226@nifty.com> | 2010-08-08 10:14:32 +0000 |
commit | 6ec43dc4b4e01464f86ac942521141e3e9ec64fc (patch) | |
tree | 3b74b7daa9310d4a620217cd5ae6f347655391f7 /table.c | |
parent | [w3m-dev 04360] Re: "important" bugs from bugs.debian.org (diff) | |
download | w3m-6ec43dc4b4e01464f86ac942521141e3e9ec64fc.tar.gz w3m-6ec43dc4b4e01464f86ac942521141e3e9ec64fc.zip |
https://bugs.launchpad.net/ubuntu/+source/w3m/+bug/131993
Diffstat (limited to '')
-rw-r--r-- | table.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $Id: table.c,v 1.56 2010/07/19 23:34:01 htrb Exp $ */ +/* $Id: table.c,v 1.57 2010/08/08 10:14:32 htrb Exp $ */ /* * HTML table */ @@ -2408,6 +2408,8 @@ table_close_anchor0(struct table *tbl, struct table_mode *mode) case HTML_N_COLGROUP:\ case HTML_COL +#define ATTR_ROWSPAN_MAX 32766 + static int feed_table_tag(struct table *tbl, char *line, struct table_mode *mode, int width, struct parsed_tag *tag) @@ -2592,6 +2594,11 @@ feed_table_tag(struct table *tbl, char *line, struct table_mode *mode, else valign = HTT_MIDDLE; if (parsedtag_get_value(tag, ATTR_ROWSPAN, &rowspan)) { + if(rowspan > ATTR_ROWSPAN_MAX) + { + fprintf(stderr, " Table Rowspan too large. Limiting to %d.\n", ATTR_ROWSPAN_MAX); + rowspan = ATTR_ROWSPAN_MAX; + } if ((tbl->row + rowspan) >= tbl->max_rowsize) check_row(tbl, tbl->row + rowspan); } |