Prevent array index out of bounds for tabattr in feed_table_tag()

Bug-Debian: https://github.com/tats/w3m/issues/60
This commit is contained in:
Tatsuya Kinoshita
2016-12-05 22:05:07 +09:00
parent d7f55d5959
commit a6ddc331e9

View File

@@ -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) {