summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2015-05-16 18:03:29 +0000
committerKirill Volinsky <mataes2007@gmail.com>2015-05-16 18:03:29 +0000
commit20d319ca66b1765ab7db9ff4905e294017ce7151 (patch)
treec8b43d7f7e8dac42c850eb1c73e04db835839591 /plugins
parent3b7a1b0c4af6fec9980a0effcffe54e671ab756d (diff)
fix for strncat use
git-svn-id: http://svn.miranda-ng.org/main/trunk@13632 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/ExternalAPI/m_folders.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/ExternalAPI/m_folders.h b/plugins/ExternalAPI/m_folders.h
index 4f896eec6d..f6f00445e6 100644
--- a/plugins/ExternalAPI/m_folders.h
+++ b/plugins/ExternalAPI/m_folders.h
@@ -209,10 +209,10 @@ __inline static INT_PTR FoldersGetCustomPathEx(HANDLE hFolderEntry, char *path,
}
if (path[0] != '\0')
- strncat(path, "\\", size);
+ strncat(path, "\\", size - mir_strlen(path));
if (fileName)
- strncat(path, fileName, size);
+ strncat(path, fileName, size - mir_strlen(path));
return res;
}
@@ -232,10 +232,10 @@ __inline static INT_PTR FoldersGetCustomPathExW(HANDLE hFolderEntry, wchar_t *pa
}
if (pathW[0] != '\0')
- wcsncat(pathW, L"\\", size);
+ wcsncat(pathW, L"\\", size - mir_wstrlen(pathW));
if (fileNameW)
- wcsncat(pathW, fileNameW, size);
+ wcsncat(pathW, fileNameW, size - mir_wstrlen(pathW));
return res;
}