mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-23 14:59:47 +03:00
Fix out of bounds array accesses for Cyrillic2 found by cppcheck.
This commit is contained in:
parent
3445483e78
commit
442d1cb3cf
@ -481,7 +481,7 @@ nserror utf8_to_local_encoding(const char *string, size_t len, char **result)
|
||||
/* get encoding name */
|
||||
enc = (alphabet <= CONT_ENC_END ? localencodings[alphabet - 100]
|
||||
: (alphabet == 120 ?
|
||||
localencodings[CONT_ENC_END + 1]
|
||||
localencodings[CONT_ENC_END - 100 + 1]
|
||||
: localencodings[0]));
|
||||
|
||||
/* create output buffer */
|
||||
@ -591,7 +591,7 @@ nserror utf8_from_local_encoding(const char *string, size_t len, char **result)
|
||||
/* get encoding name */
|
||||
enc = (alphabet <= CONT_ENC_END ? localencodings[alphabet - 100]
|
||||
: (alphabet == 120 ?
|
||||
localencodings[CONT_ENC_END + 1]
|
||||
localencodings[CONT_ENC_END - 100 + 1]
|
||||
: localencodings[0]));
|
||||
|
||||
/* create output buffer (oversized) */
|
||||
|
Loading…
Reference in New Issue
Block a user