diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-07-06 09:20:53 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2015-07-06 10:08:12 +0000 |
commit | b7c3579484c842c6de2aa46453926d2e30a1d120 (patch) | |
tree | f4e8b39555c1bf55b411d5cc5cd3958487381d72 /svl | |
parent | 2ffc7299718376fa684decb0af20e24758fd734d (diff) |
a malformed string here can force an out of bounds indexOf
Change-Id: Ic4d922bd27b7f119a7f8b95bbb4d4ed9e89fe51d
(cherry picked from commit 592ee0308a36518137ab8ed965f28de4600909da)
Reviewed-on: https://gerrit.libreoffice.org/16787
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'svl')
-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) |