aboutsummaryrefslogtreecommitdiffstats
path: root/table.c
diff options
context:
space:
mode:
authorTatsuya Kinoshita <tats@debian.org>2016-12-05 13:36:58 +0000
committerTatsuya Kinoshita <tats@debian.org>2017-01-06 13:06:56 +0000
commit738f32c1566c1906cdb0ca260b7a58c4ad213f17 (patch)
treec4fe0028ddd9a4dfd12198293be6d73df90c4aa5 /table.c
parentPrevent negative array index in set_integered_width() (diff)
downloadw3m-738f32c1566c1906cdb0ca260b7a58c4ad213f17.tar.gz
w3m-738f32c1566c1906cdb0ca260b7a58c4ad213f17.zip
Prevent array index out of bounds for tridvalue in feed_table_tag()
Bug-Debian: https://github.com/tats/w3m/issues/71 Origin: https://anonscm.debian.org/cgit/collab-maint/w3m.git/commit/?id=30b0c971676e229dabd2715c200f76bcfe27a714
Diffstat (limited to 'table.c')
-rw-r--r--table.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/table.c b/table.c
index 84e4bf6..1313533 100644
--- a/table.c
+++ b/table.c
@@ -2567,8 +2567,10 @@ feed_table_tag(struct table *tbl, char *line, struct table_mode *mode,
}
}
#ifdef ID_EXT
- if (parsedtag_get_value(tag, ATTR_ID, &p))
+ if (parsedtag_get_value(tag, ATTR_ID, &p)) {
+ check_row(tbl, tbl->row);
tbl->tridvalue[tbl->row] = Strnew_charp(p);
+ }
#endif /* ID_EXT */
tbl->trattr = align | valign;
break;