w3m

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/w3m.git/
Log | Files | Refs | README

commit 07189d6ba709c3bda53d09f1fcd3e283dfc467d2
parent 2b7c51f0bb6d011d75c6aad69e4f732823cebf81
Author: ukai <ukai>
Date:   Fri, 15 Nov 2002 16:00:33 +0000

[w3m-dev 03438] Re: segmentation fault by large complex table.
* table.c (check_table_height): check MAXROWCELL
* table.h (MAXROWCELL): added
From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>

Diffstat:
MChangeLog | 6++++++
Mtable.c | 2++
Mtable.h | 1+
3 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,5 +1,11 @@ 2002-11-16 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp> + * [w3m-dev 03438] Re: segmentation fault by large complex table. + * table.c (check_table_height): check MAXROWCELL + * table.h (MAXROWCELL): added + +2002-11-16 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp> + * [w3m-dev 03437] Re: Check image size * fm.h (MAX_IMAGE_SIZE): changed to 2048 diff --git a/table.c b/table.c @@ -1518,6 +1518,8 @@ 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); diff --git a/table.h b/table.h @@ -34,6 +34,7 @@ typedef unsigned short table_attr; #define TBL_IN_COL 4 #define MAXCELL 20 +#define MAXROWCELL 1000 struct table_cell { short col[MAXCELL]; short colspan[MAXCELL];