Kaydet (Commit) b39975bc authored tarafından Eike Rathke's avatar Eike Rathke

fixed out of bounds substring access

assuming is not good enough ...

Change-Id: Icd4f090fe94797ecf7e968855df3bb62609037c1
üst 74364dad
...@@ -1851,7 +1851,9 @@ GtkFileFilter* SalGtkFilePicker::implAddFilter( const OUString& rFilter, const O ...@@ -1851,7 +1851,9 @@ GtkFileFilter* SalGtkFilePicker::implAddFilter( const OUString& rFilter, const O
{ {
aToken = rType.getToken( 0, ';', nIndex ); aToken = rType.getToken( 0, ';', nIndex );
// Assume all have the "*.<extn>" syntax // Assume all have the "*.<extn>" syntax
aToken = aToken.copy( aToken.lastIndexOf( aStarDot ) + 2 ); sal_Int32 nStarDot = aToken.lastIndexOf( aStarDot );
if (nStarDot >= 0)
aToken = aToken.copy( nStarDot + 2 );
if (!aToken.isEmpty()) if (!aToken.isEmpty())
{ {
if (!aTokens.isEmpty()) if (!aTokens.isEmpty())
......
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