include/rtl/ustring.hxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit 4e1cf8411197b4c11a6c5d4728e047e6d46567b5 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon May 2 20:29:05 2022 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Tue May 3 09:46:23 2022 +0200 ofz#47198 Use-of-uninitialized-value seen in ww8 filter with rName of length 0 in if (rName.startsWithIgnoreAsciiCase("Tms Rmn") Change-Id: Ia8a20971161a44d62ead9bfcef59f86b007fd58b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133713 Tested-by: Caolán McNamara <caol...@redhat.com> Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx index ca061328d5a4..b7cebaf90647 100644 --- a/include/rtl/ustring.hxx +++ b/include/rtl/ustring.hxx @@ -1526,7 +1526,9 @@ public: assert( libreoffice_internal::ConstCharArrayDetector<T>::isValid(literal)); bool b - = (rtl_ustr_ascii_compareIgnoreAsciiCase_WithLengths( + = (libreoffice_internal::ConstCharArrayDetector<T>::length + <= sal_uInt32(pData->length)) + && (rtl_ustr_ascii_compareIgnoreAsciiCase_WithLengths( pData->buffer, libreoffice_internal::ConstCharArrayDetector<T>::length, libreoffice_internal::ConstCharArrayDetector<T>::toPointer(