diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-05-02 20:29:05 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2022-05-13 16:41:08 +0200 |
commit | f0ddc64c27a352117e5a7d1e2141a554caff36dc (patch) | |
tree | 86dae1ae80a2fb0469ce9b8a74fc9815466c7042 /include | |
parent | 0a3885b35e421177359faf5958117d61c9e11e72 (diff) |
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 <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 4e1cf8411197b4c11a6c5d4728e047e6d46567b5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133719
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
Diffstat (limited to 'include')
-rw-r--r-- | include/rtl/ustring.hxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx index 13cc367c5589..f9ecda47528e 100644 --- a/include/rtl/ustring.hxx +++ b/include/rtl/ustring.hxx @@ -1507,7 +1507,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( |