sal/rtl/strtmpl.hxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit a44c9d023041c881f7858ddd9d93809dc1861313 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Mon Mar 20 09:35:12 2023 +0100 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Mon Mar 20 10:44:40 2023 +0000 rtl_allocateString takes a size_t parameter Change-Id: Ibfdc0e7e3af243f157d5d14e3fbe5ab204c0b8df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149140 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/sal/rtl/strtmpl.hxx b/sal/rtl/strtmpl.hxx index ca2800c6a012..ef425a9b33ab 100644 --- a/sal/rtl/strtmpl.hxx +++ b/sal/rtl/strtmpl.hxx @@ -835,8 +835,8 @@ template <typename IMPL_RTL_STRINGDATA> IMPL_RTL_STRINGDATA* Alloc( sal_Int32 nL { constexpr auto fix = offsetof(IMPL_RTL_STRINGDATA, buffer) + sizeof IMPL_RTL_STRINGDATA::buffer; IMPL_RTL_STRINGDATA * pData - = (sal::static_int_cast< sal_uInt32 >(nLen) - <= ((SAL_MAX_UINT32 - fix) + = (o3tl::make_unsigned(nLen) + <= ((std::numeric_limits<std::size_t>::max() - fix) / sizeof (STRCODE<IMPL_RTL_STRINGDATA>))) ? static_cast<IMPL_RTL_STRINGDATA *>(rtl_allocateString( fix + nLen * sizeof (STRCODE<IMPL_RTL_STRINGDATA>)))