[iconvdata] Fix possible bad array index.
Checks
Context |
Check |
Description |
dj/TryBot-apply_patch |
success
|
Patch applied to master at the time it was sent
|
dj/TryBot-32bit |
success
|
Build for i686
|
Commit Message
`__jisx0213_to_ucs_combining` is array of 25 pairs,
so the maximum valid `ch - 1` index is 24.
---
iconvdata/euc-jisx0213.c | 1 +
1 file changed, 1 insertion(+)
@@ -194,6 +194,7 @@
\
if (ch < 0x80) \
{ \
+ assert(ch <= 25); \
/* It's a combining character. */ \
uint32_t u1 = __jisx0213_to_ucs_combining[ch - 1][0]; \
uint32_t u2 = __jisx0213_to_ucs_combining[ch - 1][1]; \