summaryrefslogtreecommitdiff
path: root/plugins/FloatingContacts/src/filedrop.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/FloatingContacts/src/filedrop.cpp')
-rw-r--r--plugins/FloatingContacts/src/filedrop.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/FloatingContacts/src/filedrop.cpp b/plugins/FloatingContacts/src/filedrop.cpp
index 87a6c1afe3..9d83459efb 100644
--- a/plugins/FloatingContacts/src/filedrop.cpp
+++ b/plugins/FloatingContacts/src/filedrop.cpp
@@ -228,7 +228,8 @@ static int CountFiles( char *szItem )
if ( NULL != strstr( szItem, "*.*" ))
{
- sprintf( szDirName + strlen( szDirName ) - 3, "%s\0", fd.cFileName );
+ size_t offset = strlen( szDirName ) - 3;
+ mir_snprintf(szDirName + offset, SIZEOF( szDirName) - offset, "%s\0", fd.cFileName);
}
++nCount;
@@ -269,7 +270,8 @@ static void SaveFiles( char *szItem, char **ppFiles, int *pnCount )
if ( NULL != strstr( szItem, "*.*" ))
{
- sprintf( szDirName + strlen( szDirName ) - 3, "%s\0", fd.cFileName );
+ size_t offset = strlen( szDirName ) - 3;
+ mir_snprintf(szDirName + offset, SIZEOF( szDirName) - offset, "%s\0", fd.cFileName);
}
ppFiles[ *pnCount ] = _strdup( szDirName );