summaryrefslogtreecommitdiff
path: root/svl/source/numbers
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-07-10 23:46:30 +0200
committerEike Rathke <erack@redhat.com>2015-07-11 03:08:36 +0200
commitf52aa4d13b7f262a4c54f4e554f45d64a545bce7 (patch)
treed6cabbed96442672dec6d65a3e9a194384fafc34 /svl/source/numbers
parentb3c11e2b3ef4bad8c2b5f92ba00ac805fb68786f (diff)
fix string access out of bounds
Could happen with a malformed subformat string like "[<0-0". Change-Id: I8eaab2bcb469d91432a41dc349060c273a6575a4
Diffstat (limited to 'svl/source/numbers')
-rw-r--r--svl/source/numbers/zformat.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index e725d1d8944d..c6450347997e 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -697,7 +697,7 @@ SvNumberformat::SvNumberformat(OUString& rString,
{
fLimit2 = fNumber;
}
- if ( sBuff[nPos] == ']' )
+ if ( nPos < sBuff.getLength() && sBuff[nPos] == ']' )
{
nPos++;
}