From 7bb2a4671503c41d63989dcef9ef54dea0c73b43 Mon Sep 17 00:00:00 2001 From: Tatsuya Kinoshita Date: Thu, 7 Apr 2016 06:42:55 +0900 Subject: Fix segfault on bogus text Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=820162 --- libwc/map/gb2312_ucs.map | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libwc/map/gb2312_ucs.map') 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 */ -- cgit v1.2.3