[Libreoffice-commits] core.git: svl/source
Caolán McNamara
caolanm at redhat.com
Wed Nov 6 16:27:17 CET 2013
svl/source/numbers/zforscan.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit e7c6ebf38fe5e27c598dff970851d2e9fef6adc5
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Nov 6 15:24:55 2013 +0000
check string bounds
as demonstrated by fdo54887-1.ods
Change-Id: I2d5568126c58c831446b4c4b050ffed193f7921d
diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index 1fb4d65..fe0bc31 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 )
More information about the Libreoffice-commits
mailing list