Kaydet (Commit) e7c6ebf3 authored tarafından Caolán McNamara's avatar Caolán McNamara

check string bounds

as demonstrated by fdo54887-1.ods

Change-Id: I2d5568126c58c831446b4c4b050ffed193f7921d
üst f8f0f18d
...@@ -762,7 +762,7 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr, ...@@ -762,7 +762,7 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr,
eType = nTmpType; eType = nTmpType;
sal_Int32 nLen = sKeyword[eType].getLength(); sal_Int32 nLen = sKeyword[eType].getLength();
sSymbol = rStr.copy( nPos-1, nLen ); 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]; sal_Unicode cNext = rStr[nPos];
switch ( cNext ) switch ( cNext )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment