From 442d1cb3cffe60253ab1481c0168d1708644fc97 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Wed, 2 Apr 2014 21:00:48 +0100 Subject: Fix out of bounds array accesses for Cyrillic2 found by cppcheck. --- riscos/ucstables.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'riscos') 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) */ -- cgit v1.2.3