summaryrefslogtreecommitdiff
path: root/riscos
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2014-04-02 21:00:48 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2014-04-02 21:00:48 +0100
commit442d1cb3cffe60253ab1481c0168d1708644fc97 (patch)
tree432c88341854c066677473658a120a4164cdd827 /riscos
parent3445483e7838719d3feb0a6daf0fa9290b0cfb3f (diff)
downloadnetsurf-442d1cb3cffe60253ab1481c0168d1708644fc97.tar.gz
netsurf-442d1cb3cffe60253ab1481c0168d1708644fc97.tar.bz2
Fix out of bounds array accesses for Cyrillic2 found by cppcheck.
Diffstat (limited to 'riscos')
-rw-r--r--riscos/ucstables.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/riscos/ucstables.c b/riscos/ucstables.c
index cc6fe051a..f9b6b3648 100644
--- a/riscos/ucstables.c
+++ b/riscos/ucstables.c
@@ -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) */