summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-03-21 22:50:15 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-03-22 09:00:57 +0000
commit7778d9f51bd1f4d086cafe95995406c3157afb89 (patch)
tree9a43660947b78d9f714c45e1be48ef46dd0d082e /sal
parent02bccbe0d59e50a7fd987c81c4d15b2fd4d24538 (diff)
Prevent calls to rtl/character.hxx functions with (signed) char arguments
...that would implicitly be sign extended (for plain char only if it is signed), so non-ASCII char values would trigger the isUnicodeCodePoint assert. Change-Id: Iaf8024ad509e64525558e882fe3fd078cfb4ea91 Reviewed-on: https://gerrit.libreoffice.org/35523 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sal')
-rw-r--r--sal/rtl/math.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/sal/rtl/math.cxx b/sal/rtl/math.cxx
index 72558a946131..5dc94e0e0c1f 100644
--- a/sal/rtl/math.cxx
+++ b/sal/rtl/math.cxx
@@ -918,8 +918,12 @@ double SAL_CALL rtl_math_stringToDouble(sal_Char const * pBegin,
sal_Char const ** pParsedEnd)
SAL_THROW_EXTERN_C()
{
- return stringToDouble(pBegin, pEnd, cDecSeparator, cGroupSeparator, pStatus,
- pParsedEnd);
+ return stringToDouble(
+ reinterpret_cast<unsigned char const *>(pBegin),
+ reinterpret_cast<unsigned char const *>(pEnd),
+ static_cast<unsigned char>(cDecSeparator),
+ static_cast<unsigned char>(cGroupSeparator), pStatus,
+ reinterpret_cast<unsigned char const **>(pParsedEnd));
}
double SAL_CALL rtl_math_uStringToDouble(sal_Unicode const * pBegin,