From a6ddc331e90698fa57732bd55f2e8407f3f32f7a Mon Sep 17 00:00:00 2001 From: Tatsuya Kinoshita Date: Mon, 5 Dec 2016 22:05:07 +0900 Subject: Prevent array index out of bounds for tabattr in feed_table_tag() Bug-Debian: https://github.com/tats/w3m/issues/60 --- table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'table.c') diff --git a/table.c b/table.c index 572ebd6..ea127f0 100644 --- a/table.c +++ b/table.c @@ -2592,7 +2592,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) { -- cgit v1.2.3