aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorTatsuya Kinoshita <tats@debian.org>2016-11-14 12:01:08 +0000
committerTatsuya Kinoshita <tats@debian.org>2016-11-14 12:20:44 +0000
commit0c3f5d0e0d9269ad47b8f4b061d7818993913189 (patch)
treebf75b3c2981063176d764c763120551ab5108cc1 /file.c
parentUpdate ChangeLog (diff)
downloadw3m-0c3f5d0e0d9269ad47b8f4b061d7818993913189.tar.gz
w3m-0c3f5d0e0d9269ad47b8f4b061d7818993913189.zip
Prevent array index out of bounds for symbol
Bug-Debian: https://github.com/tats/w3m/issues/38
Diffstat (limited to 'file.c')
-rw-r--r--file.c2
1 files changed, 1 insertions, 1 deletions
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;