diff options
author | Tatsuya Kinoshita <tats@debian.org> | 2016-04-06 21:42:55 +0000 |
---|---|---|
committer | Tatsuya Kinoshita <tats@debian.org> | 2016-11-19 05:10:16 +0000 |
commit | aef7b47fbae8c4c79caf903903e67f483c23ded5 (patch) | |
tree | 6db75e19be637c37a5469215ece803766226318a /libwc/ucs.map | |
parent | Merge branch 'bug/changelog' (diff) | |
download | w3m-aef7b47fbae8c4c79caf903903e67f483c23ded5.tar.gz w3m-aef7b47fbae8c4c79caf903903e67f483c23ded5.zip |
Fix segfault on bogus text
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=820162
Origin: https://anonscm.debian.org/cgit/collab-maint/w3m.git/commit/?id=7bb2a4671503c41d63989dcef9ef54dea0c73b43
Bug-Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=1324348
cf. https://lists.fedoraproject.org/pipermail/package-announce/2016-April/182697.html
Diffstat (limited to '')
-rw-r--r-- | libwc/ucs.map | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/libwc/ucs.map b/libwc/ucs.map index dfac6d9..5d6f688 100644 --- a/libwc/ucs.map +++ b/libwc/ucs.map @@ -195,7 +195,28 @@ static wc_uint16 *cs94w_ucs_map[] = { jisx0212x02132_ucs_map, /* 50 (JIS X 0213-2) */ }; +static wc_uint32 cs94w_ucs_map_size[] = { + N_jisx0208x02131_ucs_map, /* 40 (JIS C 6226) */ + N_gb2312_ucs_map, /* 41 (GB 2312) */ + N_jisx0208x02131_ucs_map, /* 42 (JIS X 0208) */ + N_ksx1001_ucs_map, /* 43 (KS X 1001) */ + N_jisx0212x02132_ucs_map, /* 44 (JIS X 0212) */ + 0, /* 45 (ISO IR 165) */ + 0, /* 46 */ + N_cns116431_ucs_map, /* 47 (CNS 11643-1) */ + N_cns116432_ucs_map, /* 48 (CNS 11643-2) */ + 0, /* 49 (CNS 11643-3) */ + 0, /* 4A (CNS 11643-4) */ + 0, /* 4B (CNS 11643-5) */ + 0, /* 4C (CNS 11643-6) */ + 0, /* 4D (CNS 11643-7) */ + 0, /* 4E (KSP 9566) */ + N_jisx0208x02131_ucs_map, /* 4F (JIS X 0213-1) */ + N_jisx0212x02132_ucs_map, /* 50 (JIS X 0213-2) */ +}; + static wc_uint16 **cs96w_ucs_map; +static wc_uint32 *cs96w_ucs_map_size; static wc_uint16 *pcsw_ucs_map[] = { big5_ucs_map, /* Big5 */ @@ -233,6 +254,42 @@ static wc_uint16 *pcsw_ucs_map[] = { hkscs_ucs_map, /* HKSCS-2 */ }; +static wc_uint32 pcsw_ucs_map_size[] = { + N_big5_ucs_map, /* Big5 */ + N_big5_ucs_map, /* Big5-1 */ + N_big5_ucs_map, /* Big5-2 */ + 0, /* CNS 11643-8 */ + 0, /* CNS 11643-9 */ + 0, /* CNS 11643-10 */ + 0, /* CNS 11643-11 */ + 0, /* CNS 11643-12 */ + 0, /* CNS 11643-13 */ + 0, /* CNS 11643-14 */ + 0, /* CNS 11643-15 */ + 0, /* CNS 11643-16 */ + 0, /* CNS 11643-X */ + N_gb12345_ucs_map, /* GB 12345 */ + 0, /* Johab (special conversion) */ + 0, /* Johab-1 (special conversion) */ + 0, /* Johab-2 (special conversion) */ + N_ksx1001_ucs_map, /* Johab-3 */ + N_sjis_ext_ucs_map, /* Shift_JIS(CP932) ext */ + N_sjis_ext_ucs_map, /* Shift_JIS(CP932) ext-1 */ + N_sjis_ext_ucs_map, /* Shift_JIS(CP932) ext-2 */ + N_gbk_ucs_map, /* GBK(CP936) */ + N_gbk_ucs_map, /* GBK(CP936)-1 */ + N_gbk_ucs_map, /* GBK(CP936)-2 */ + 0, /* GB18030 GBK-ext (special conversion) */ + 0, /* GB18030 GBK-ext-1 (special conversion) */ + 0, /* GB18030 GBK-ext-2 (special conversion) */ + N_uhc_ucs_map, /* UHC(CP949) */ + N_uhc_ucs_map, /* UHC(CP949)-1 */ + N_uhc_ucs_map, /* UHC(CP949)-2 */ + N_hkscs_ucs_map, /* HKSCS */ + N_hkscs_ucs_map, /* HKSCS-1 */ + N_hkscs_ucs_map, /* HKSCS-2 */ +}; + static wc_wchar_t ucs_cs94_conv(wc_ccs ccs, wc_uint16 c) { |