Prevent global-buffer-overflow in wc_any_to_ucs()

Bug-Debian: https://github.com/tats/w3m/issues/43
This commit is contained in:
Tatsuya Kinoshita
2016-11-18 22:08:33 +09:00
parent 8f4f57658c
commit 716bc12663
2 changed files with 44 additions and 0 deletions

View File

@@ -178,6 +178,7 @@ wc_any_to_ucs(wc_wchar_t cc)
return WC_C_UCS2_EURO;
}
map = pcs_ucs_map[f - WC_F_PCS_BASE];
map_size = pcs_ucs_map_size[f - WC_F_PCS_BASE];
cc.code &= 0x7f;
break;
case WC_CCS_A_PCSW: