aboutsummaryrefslogtreecommitdiffstats
path: root/libwc/map
diff options
context:
space:
mode:
authorTatsuya Kinoshita <tats@debian.org>2016-04-06 21:42:55 +0000
committerTatsuya Kinoshita <tats@debian.org>2016-04-06 21:42:55 +0000
commit7bb2a4671503c41d63989dcef9ef54dea0c73b43 (patch)
treee43704e1f5ae0b762027fb3e6a817cc115ff7efb /libwc/map
parentUpdate ChangeLog (diff)
downloadw3m-7bb2a4671503c41d63989dcef9ef54dea0c73b43.tar.gz
w3m-7bb2a4671503c41d63989dcef9ef54dea0c73b43.zip
Fix segfault on bogus text
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=820162
Diffstat (limited to '')
-rw-r--r--libwc/map/big5_ucs.map4
-rw-r--r--libwc/map/cns11643_ucs.map8
-rw-r--r--libwc/map/gb12345_ucs.map4
-rw-r--r--libwc/map/gb2312_ucs.map4
-rw-r--r--libwc/map/gbk_ucs.map4
-rw-r--r--libwc/map/hkscs_ucs.map4
-rw-r--r--libwc/map/jisx0208x0212x0213_ucs.map8
-rw-r--r--libwc/map/ksx1001_ucs.map4
-rw-r--r--libwc/map/sjis_ext_ucs.map4
-rw-r--r--libwc/map/uhc_ucs.map4
10 files changed, 36 insertions, 12 deletions
diff --git a/libwc/map/big5_ucs.map b/libwc/map/big5_ucs.map
index 0c6fd12..ac817a9 100644
--- a/libwc/map/big5_ucs.map
+++ b/libwc/map/big5_ucs.map
@@ -1,6 +1,8 @@
/* Big5 (Chinese Taiwan) */
-static wc_uint16 big5_ucs_map[ 0x59 * 0x9D ] = {
+#define N_big5_ucs_map (0x59 * 0x9D)
+
+static wc_uint16 big5_ucs_map[ N_big5_ucs_map ] = {
0x3000, /* 0xA140 */
0xFF0C, /* 0xA141 */
0x3001, /* 0xA142 */
diff --git a/libwc/map/cns11643_ucs.map b/libwc/map/cns11643_ucs.map
index b426dd3..fcba334 100644
--- a/libwc/map/cns11643_ucs.map
+++ b/libwc/map/cns11643_ucs.map
@@ -1,6 +1,8 @@
/* CNS 11643 (Chinese Taiwan) */
-static wc_uint16 cns116431_ucs_map[ 0x5E * 0x5E ] = {
+#define N_cns116431_ucs_map (0x5E * 0x5E)
+
+static wc_uint16 cns116431_ucs_map[ N_cns116431_ucs_map ] = {
0x3000, /* 0x2121 */
0xFF0C, /* 0x2122 */
0x3001, /* 0x2123 */
@@ -8839,7 +8841,9 @@ static wc_uint16 cns116431_ucs_map[ 0x5E * 0x5E ] = {
0, /* 0x7E7E */
};
-static wc_uint16 cns116432_ucs_map[ 0x5E * 0x5E ] = {
+#define N_cns116432_ucs_map (0x5E * 0x5E)
+
+static wc_uint16 cns116432_ucs_map[ N_cns116432_ucs_map ] = {
0x4E42, /* 0x2121 */
0x4E5C, /* 0x2122 */
0x51F5, /* 0x2123 */
diff --git a/libwc/map/gb12345_ucs.map b/libwc/map/gb12345_ucs.map
index 55558c7..3fb338d 100644
--- a/libwc/map/gb12345_ucs.map
+++ b/libwc/map/gb12345_ucs.map
@@ -1,6 +1,8 @@
/* GB 12345 (Chinese) */
-static wc_uint16 gb12345_ucs_map[ 0x5E * 0x5E ] = {
+#define N_gb12345_ucs_map (0x5E * 0x5E)
+
+static wc_uint16 gb12345_ucs_map[ N_gb12345_ucs_map ] = {
0x3000, /* 0x2121 */
0x3001, /* 0x2122 */
0x3002, /* 0x2123 */
diff --git a/libwc/map/gb2312_ucs.map b/libwc/map/gb2312_ucs.map
index 38fb88f..3d37465 100644
--- a/libwc/map/gb2312_ucs.map
+++ b/libwc/map/gb2312_ucs.map
@@ -1,6 +1,8 @@
/* GB 2312 (Chinese) */
-static wc_uint16 gb2312_ucs_map[ 0x5E * 0x5E ] = {
+#define N_gb2312_ucs_map (0x5E * 0x5E)
+
+static wc_uint16 gb2312_ucs_map[ N_gb2312_ucs_map ] = {
0x3000, /* 0x2121 */
0x3001, /* 0x2122 */
0x3002, /* 0x2123 */
diff --git a/libwc/map/gbk_ucs.map b/libwc/map/gbk_ucs.map
index 5a0d5ba..d092fd7 100644
--- a/libwc/map/gbk_ucs.map
+++ b/libwc/map/gbk_ucs.map
@@ -6,7 +6,9 @@ static wc_map ucs_gbk_80_map[ N_ucs_gbk_80_map ] = {
{ 0x20AC, 0x0080 },
};
-static wc_uint16 gbk_ucs_map[ 0x7E * 0xBE - 0x5E * 0x5E + 0x0A + 0x16 + 0x06 ] = {
+#define N_gbk_ucs_map (0x7E * 0xBE - 0x5E * 0x5E + 0x0A + 0x16 + 0x06)
+
+static wc_uint16 gbk_ucs_map[ N_gbk_ucs_map ] = {
0x4E02, /* 0x8140 */
0x4E04, /* 0x8141 */
0x4E05, /* 0x8142 */
diff --git a/libwc/map/hkscs_ucs.map b/libwc/map/hkscs_ucs.map
index 96d1566..2fbe6b4 100644
--- a/libwc/map/hkscs_ucs.map
+++ b/libwc/map/hkscs_ucs.map
@@ -1,6 +1,8 @@
/* HKSCS (Chinese Hong Kong) */
-static wc_uint16 hkscs_ucs_map[ 0x1E * 0x9D ] = {
+#define N_hkscs_ucs_map (0x1E * 0x9D)
+
+static wc_uint16 hkscs_ucs_map[ N_hkscs_ucs_map ] = {
0, /* 0x8840 */
0, /* 0x8841 */
0, /* 0x8842 */
diff --git a/libwc/map/jisx0208x0212x0213_ucs.map b/libwc/map/jisx0208x0212x0213_ucs.map
index 1a1d706..28c2a6c 100644
--- a/libwc/map/jisx0208x0212x0213_ucs.map
+++ b/libwc/map/jisx0208x0212x0213_ucs.map
@@ -1,6 +1,8 @@
/* JIS X 0208, JIS X 0212, JIS X 0213 (Japanese) */
-static wc_uint16 jisx0208x02131_ucs_map[ 0x5E * 0x5E ] = {
+#define N_jisx0208x02131_ucs_map (0x5E * 0x5E)
+
+static wc_uint16 jisx0208x02131_ucs_map[ N_jisx0208x02131_ucs_map ] = {
0x3000, /* JIS X 0208 0x2121 */
0x3001, /* JIS X 0208 0x2122 */
0x3002, /* JIS X 0208 0x2123 */
@@ -8839,7 +8841,9 @@ static wc_uint16 jisx0208x02131_ucs_map[ 0x5E * 0x5E ] = {
0, /* JIS X 0213-1 0x7E7E */
};
-static wc_uint16 jisx0212x02132_ucs_map[ 0x5E * 0x5E ] = {
+#define N_jisx0212x02132_ucs_map (0x5E * 0x5E)
+
+static wc_uint16 jisx0212x02132_ucs_map[ N_jisx0212x02132_ucs_map ] = {
0, /* JIS X 0213-2 0x2121 */
0x4E02, /* JIS X 0213-2 0x2122 */
0x4E0F, /* JIS X 0213-2 0x2123 */
diff --git a/libwc/map/ksx1001_ucs.map b/libwc/map/ksx1001_ucs.map
index 9a17d61..cb62f98 100644
--- a/libwc/map/ksx1001_ucs.map
+++ b/libwc/map/ksx1001_ucs.map
@@ -1,6 +1,8 @@
/* KS X 1001 (Korean) */
-static wc_uint16 ksx1001_ucs_map[ 0x5E * 0x5E ] = {
+#define N_ksx1001_ucs_map (0x5E * 0x5E)
+
+static wc_uint16 ksx1001_ucs_map[ N_ksx1001_ucs_map ] = {
0x3000, /* 0x2121 */
0x3001, /* 0x2122 */
0x3002, /* 0x2123 */
diff --git a/libwc/map/sjis_ext_ucs.map b/libwc/map/sjis_ext_ucs.map
index a82995c..cc748ba 100644
--- a/libwc/map/sjis_ext_ucs.map
+++ b/libwc/map/sjis_ext_ucs.map
@@ -1,6 +1,8 @@
/* Shift_JIS/CP932 (Japanese) */
-static wc_uint16 sjis_ext_ucs_map[ 0x5E * 10 ] = {
+#define N_sjis_ext_ucs_map (0x5E * 10)
+
+static wc_uint16 sjis_ext_ucs_map[ N_sjis_ext_ucs_map ] = {
0x2460, /* 0x8740 */
0x2461, /* 0x8741 */
0x2462, /* 0x8742 */
diff --git a/libwc/map/uhc_ucs.map b/libwc/map/uhc_ucs.map
index b6b43ca..55efc09 100644
--- a/libwc/map/uhc_ucs.map
+++ b/libwc/map/uhc_ucs.map
@@ -1,6 +1,8 @@
/* UHC/CP949 (Korean) */
-static wc_uint16 uhc_ucs_map[ 0x20 * 0xB2 + 0x27 * 0x54 + 2 ] = {
+#define N_uhc_ucs_map (0x20 * 0xB2 + 0x27 * 0x54 + 2)
+
+static wc_uint16 uhc_ucs_map[ N_uhc_ucs_map ] = {
0xAC02, /* 0x8141 */
0xAC03, /* 0x8142 */
0xAC05, /* 0x8143 */