summaryrefslogtreecommitdiff
path: root/padmin
diff options
context:
space:
mode:
authorPhilipp Lohmann <pl@openoffice.org>2002-09-11 14:57:15 +0000
committerPhilipp Lohmann <pl@openoffice.org>2002-09-11 14:57:15 +0000
commite12e79f21b95fef7558dde8d7a40fb835cd8338e (patch)
treeb9bc08171cbd90a99000cadf8eea0bbe15c147c0 /padmin
parentd9ed1c74dac10a41c773bc34815693c3b1ff8fd0 (diff)
#i6182# #103147# ensure sufficient suffix length
Diffstat (limited to 'padmin')
-rw-r--r--padmin/source/helper.cxx17
1 files changed, 10 insertions, 7 deletions
diff --git a/padmin/source/helper.cxx b/padmin/source/helper.cxx
index 2138d6fedb4c..fbcde509c03a 100644
--- a/padmin/source/helper.cxx
+++ b/padmin/source/helper.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: helper.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: pl $ $Date: 2002-09-03 13:33:00 $
+ * last change: $Author: pl $ $Date: 2002-09-11 15:57:15 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -161,12 +161,15 @@ void padmin::FindFiles( const String& rDirectory, ::std::list< String >& rResult
while( nToken-- )
{
String aSuffix = rSuffixes.GetToken( nToken, ';' );
- String aExtension = aFileName.Copy( aFileName.Len()-aSuffix.Len() );
- if( aFileName.GetChar( aFileName.Len()-aSuffix.Len()-1 ) == '.' &&
- aExtension.EqualsIgnoreCaseAscii( aSuffix ) )
+ if( aFileName.Len() > aSuffix.Len()+1 )
{
- rResult.push_back( aFileName );
- break;
+ String aExtension = aFileName.Copy( aFileName.Len()-aSuffix.Len() );
+ if( aFileName.GetChar( aFileName.Len()-aSuffix.Len()-1 ) == '.' &&
+ aExtension.EqualsIgnoreCaseAscii( aSuffix ) )
+ {
+ rResult.push_back( aFileName );
+ break;
+ }
}
}
}