summaryrefslogtreecommitdiff
path: root/plugins/HTTPServer/src/IndexHTML.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2015-05-16 18:09:55 +0000
committerKirill Volinsky <mataes2007@gmail.com>2015-05-16 18:09:55 +0000
commit5b2ebe7fef3a15c5db381816241bf16850c8176a (patch)
treefbe3a0302f1d9ce28b82d04aa4474e38f9768044 /plugins/HTTPServer/src/IndexHTML.cpp
parente425f74c45bf3d947f625599d1464c5591544487 (diff)
fix for strncat use
git-svn-id: http://svn.miranda-ng.org/main/trunk@13634 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/HTTPServer/src/IndexHTML.cpp')
-rw-r--r--plugins/HTTPServer/src/IndexHTML.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/HTTPServer/src/IndexHTML.cpp b/plugins/HTTPServer/src/IndexHTML.cpp
index 89fc56f157..fed678827d 100644
--- a/plugins/HTTPServer/src/IndexHTML.cpp
+++ b/plugins/HTTPServer/src/IndexHTML.cpp
@@ -63,7 +63,7 @@ bool LoadIndexHTMLTemplate() {
char* pszDestBuf = szDestBuf;
strncpy(pszBuf, szPluginPath, SIZEOF(szBuf)-1);
- strncat(pszBuf, szIndexHTMLTemplateFile, SIZEOF(szBuf)-1);
+ strncat(pszBuf, szIndexHTMLTemplateFile, SIZEOF(szBuf) - mir_strlen(szBuf));
HANDLE hFile = CreateFile(pszBuf, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
@@ -284,7 +284,7 @@ bool bCreateIndexHTML(const char * pszRealPath, const char * pszIndexPath,
// check if directory exists
char szMask[MAX_PATH];
strncpy(szMask, pszRealPath, MAX_PATH- 1);
- strncat(szMask, "*", MAX_PATH- 1);
+ strncat(szMask, "*", SIZEOF(szMask) - mir_strlen(szMask));
WIN32_FIND_DATAA fdFindFileData;
HANDLE hFind = FindFirstFile(szMask, &fdFindFileData);