aboutsummaryrefslogtreecommitdiffstats
path: root/table.c
diff options
context:
space:
mode:
authorTatsuya Kinoshita <tats@debian.org>2016-12-05 13:05:07 +0000
committerTatsuya Kinoshita <tats@debian.org>2017-01-06 13:04:42 +0000
commitb98dd1fd86f04f7ed256b3bfed08210ff38f8919 (patch)
tree0b06c6f5e7eaac0c53cb3ef6974f5e68a4c8af65 /table.c
parentPrevent negative array index in process_textarea() (diff)
downloadw3m-b98dd1fd86f04f7ed256b3bfed08210ff38f8919.tar.gz
w3m-b98dd1fd86f04f7ed256b3bfed08210ff38f8919.zip
Prevent array index out of bounds for tabattr in feed_table_tag()
Bug-Debian: https://github.com/tats/w3m/issues/60 Origin: https://anonscm.debian.org/cgit/collab-maint/w3m.git/commit/?id=a6ddc331e90698fa57732bd55f2e8407f3f32f7a
Diffstat (limited to 'table.c')
-rw-r--r--table.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/table.c b/table.c
index c57187a..1a37772 100644
--- a/table.c
+++ b/table.c
@@ -2593,7 +2593,7 @@ feed_table_tag(struct table *tbl, char *line, struct table_mode *mode,
}
tbl->col++;
check_row(tbl, tbl->row);
- while (tbl->tabattr[tbl->row][tbl->col]) {
+ while (tbl->col < MAXCOL && tbl->tabattr[tbl->row][tbl->col]) {
tbl->col++;
}
if (tbl->col > MAXCOL - 1) {