From ccb89b45335feaf9f803f3ba9cda468604416c39 Mon Sep 17 00:00:00 2001 From: Fumitoshi UKAI Date: Tue, 26 Nov 2002 07:09:09 +0000 Subject: w3m 0.3.2 branch: backport from trunk * [w3m-dev 03371] segmentation fault by large complex table. * table.c (bsearch_2short): indexarry char to short (bsearch_double): ditto (dv2sv): ditto (table_rule_width): ditto (set_integrated_width): ditto (check_table_height): ditto (feed_table_tag): ditto * table.h (struct table_cell): index, eindex char to short From: Hironori SAKAMOTO --- table.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'table.c') diff --git a/table.c b/table.c index afcf6a2..6949b3b 100644 --- a/table.c +++ b/table.c @@ -1,4 +1,4 @@ -/* $Id: table.c,v 1.31 2002/11/25 16:39:53 ukai Exp $ */ +/* $Id: table.c,v 1.27.4.1 2002/11/26 07:09:09 ukai Exp $ */ /* * HTML table */ @@ -1518,8 +1518,6 @@ check_table_height(struct table *t) if (cell.row[idx] == j && cell.rowspan[idx] == rowspan) c = idx; } - if (c >= MAXROWCELL) - continue; if (c >= cell.size) { if (cell.size == 0) { cell.size = max(MAXCELL, c + 1); @@ -1544,7 +1542,7 @@ check_table_height(struct table *t) cell.rowspan[cell.maxcell] = rowspan; cell.height[cell.maxcell] = 0; if (cell.maxcell > k) { - int ii; + int ii; for (ii = k; ii < cell.maxcell; ii++) cell.indexarray[ii + 1] = cell.indexarray[ii]; } @@ -2661,7 +2659,7 @@ feed_table_tag(struct table *tbl, char *line, struct table_mode *mode, cell->minimum_width[cell->maxcell] = 0; cell->fixed_width[cell->maxcell] = 0; if (cell->maxcell > k) { - int ii; + int ii; for (ii = k; ii < cell->maxcell; ii++) cell->index[ii + 1] = cell->index[ii]; } @@ -2969,11 +2967,9 @@ feed_table_tag(struct table *tbl, char *line, struct table_mode *mode, break; case HTML_SCRIPT: mode->pre_mode |= TBLM_SCRIPT; - mode->ignore_tag = Strnew_charp(""); break; case HTML_STYLE: mode->pre_mode |= TBLM_STYLE; - mode->ignore_tag = Strnew_charp(""); break; case HTML_N_A: table_close_anchor0(tbl, mode); -- cgit v1.2.3