diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-11-16 14:16:03 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-11-17 20:10:51 +0000 |
commit | fe0ed1e8bbc0cf8d0957474dcbd42b7153adb09b (patch) | |
tree | 5e28029a39839cf8a055cfebe0cbc028d16f79a4 /sal | |
parent | c8383757fb031b2211cb6d1fdec7ac9045e72916 (diff) |
valgrind: rtl_ustr_asciil_reverseEquals_WithLength is a death trap
Change-Id: If5c4c0b59aa91ec3775e2c15c4edb57bd7ac9aa7
Diffstat (limited to 'sal')
-rw-r--r-- | sal/inc/rtl/ustring.hxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sal/inc/rtl/ustring.hxx b/sal/inc/rtl/ustring.hxx index 2489e3c0cc1e..39ddb49f13cb 100644 --- a/sal/inc/rtl/ustring.hxx +++ b/sal/inc/rtl/ustring.hxx @@ -903,7 +903,8 @@ public: template< typename T > typename internal::ConstCharArrayDetector< T, bool >::Type startsWith( T& literal ) const { - return rtl_ustr_asciil_reverseEquals_WithLength( pData->buffer, literal, + return internal::ConstCharArrayDetector< T, void >::size - 1 <= pData->length + && rtl_ustr_asciil_reverseEquals_WithLength( pData->buffer, literal, internal::ConstCharArrayDetector< T, void >::size - 1); } |