summaryrefslogtreecommitdiff
path: root/include/rtl/ustring.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'include/rtl/ustring.hxx')
-rw-r--r--include/rtl/ustring.hxx4
1 files changed, 3 insertions, 1 deletions
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(