diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-11-06 15:24:55 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-11-06 15:24:58 +0000 |
commit | e7c6ebf38fe5e27c598dff970851d2e9fef6adc5 (patch) | |
tree | c2c03930c3cd56adeb8355b108041a472ffa727b /svl/source/numbers | |
parent | f8f0f18d7109db4dc140524027c1dd18b6c7dee7 (diff) |
check string bounds
as demonstrated by fdo54887-1.ods
Change-Id: I2d5568126c58c831446b4c4b050ffed193f7921d
Diffstat (limited to 'svl/source/numbers')
-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 1fb4d657cad4..fe0bc311d251 100644 --- a/svl/source/numbers/zforscan.cxx +++ b/svl/source/numbers/zforscan.cxx @@ -762,7 +762,7 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr, eType = nTmpType; sal_Int32 nLen = sKeyword[eType].getLength(); sSymbol = rStr.copy( nPos-1, nLen ); - if ( eType == NF_KEY_E || IsAmbiguousE( eType ) ) + if ((eType == NF_KEY_E || IsAmbiguousE(eType)) && nPos < rStr.getLength()) { sal_Unicode cNext = rStr[nPos]; switch ( cNext ) |