diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2023-03-20 09:35:12 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2023-03-20 10:44:40 +0000 |
commit | a44c9d023041c881f7858ddd9d93809dc1861313 (patch) | |
tree | 2c5ac5f6a0e4960f830d58d9e25059c77db98505 /sal | |
parent | 75249d502e83c10ec38ef8cc8ee58c6c877c6ee9 (diff) |
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 <sbergman@redhat.com>
Diffstat (limited to 'sal')
-rw-r--r-- | sal/rtl/strtmpl.hxx | 4 |
1 files changed, 2 insertions, 2 deletions
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>))) |