diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-07-06 09:20:53 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-07-06 09:34:35 +0100 |
commit | 592ee0308a36518137ab8ed965f28de4600909da (patch) | |
tree | 1bfc681f0e4382f08dbec7b0de7e20283c35a561 /svl/source | |
parent | 166ee1186c46bdedae14c87bd122d56301f30d48 (diff) |
a malformed string here can force an out of bounds indexOf
Change-Id: Ic4d922bd27b7f119a7f8b95bbb4d4ed9e89fe51d
Diffstat (limited to 'svl/source')
-rw-r--r-- | svl/source/numbers/zforscan.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx index ba942391f668..b539782e0f49 100644 --- a/svl/source/numbers/zforscan.cxx +++ b/svl/source/numbers/zforscan.cxx @@ -889,7 +889,7 @@ sal_Int32 ImpSvNumberformatScan::Symbol_Division(const OUString& rString) // Do we have some sort of currency? OUString sString = pFormatter->GetCharClass()->uppercase(rString); sal_Int32 nCPos = 0; - while (nCPos >= 0) + while (nCPos >= 0 && nCPos < sString.getLength()) { nCPos = sString.indexOf(GetCurString(),nCPos); if (nCPos >= 0) |