summaryrefslogtreecommitdiff
path: root/i18npool
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-11-05 16:47:40 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-11-06 09:12:36 +0000
commit16c31e90f791c5a690ca1901c0fa40369023658b (patch)
tree70d3368aa598bba1ec1e8fe4a7a33d09f361126f /i18npool
parent9bd00edca5f45b809221197a75a620ff30a8ceb0 (diff)
don't access string out of bounds
Change-Id: I562fbdb9eec3af297ea95a0d161721ec345e6a19
Diffstat (limited to 'i18npool')
-rw-r--r--i18npool/source/breakiterator/breakiteratorImpl.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/i18npool/source/breakiterator/breakiteratorImpl.cxx b/i18npool/source/breakiterator/breakiteratorImpl.cxx
index 4235027feeca..f969e7f82814 100644
--- a/i18npool/source/breakiterator/breakiteratorImpl.cxx
+++ b/i18npool/source/breakiterator/breakiteratorImpl.cxx
@@ -347,7 +347,7 @@ sal_Int32 SAL_CALL BreakIteratorImpl::nextScript( const OUString& Text, sal_Int3
if (nStartPos < 0)
nStartPos = 0;
sal_Int32 strLen = Text.getLength();
- if (nStartPos > strLen)
+ if (nStartPos >= strLen)
return -1;
sal_Int16 numberOfChange = (ScriptType == getScriptClass(Text.iterateCodePoints(&nStartPos, 0))) ? 2 : 1;