From 0c3f5d0e0d9269ad47b8f4b061d7818993913189 Mon Sep 17 00:00:00 2001 From: Tatsuya Kinoshita Date: Mon, 14 Nov 2016 21:01:08 +0900 Subject: Prevent array index out of bounds for symbol Bug-Debian: https://github.com/tats/w3m/issues/38 --- file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'file.c') diff --git a/file.c b/file.c index b84a51a..bcb5916 100644 --- a/file.c +++ b/file.c @@ -7611,7 +7611,7 @@ conv_symbol(Line *l) symbol = get_symbol(DisplayCharset, &w); #endif } - Strcat_charp(tmp, symbol[(int)c]); + Strcat_charp(tmp, symbol[(unsigned char)c % N_SYMBOL]); #ifdef USE_M17N p += len - 1; pr += len - 1; -- cgit v1.2.3