diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-23 17:49:58 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-23 17:49:58 +0000 |
commit | 6fcfba2c46a456677b5825a899469ba4e8905448 (patch) | |
tree | b4b6f6f9001b8609998a815ec1c7c92aa30b287e /plugins/HTTPServer/src/IndexHTML.cpp | |
parent | 24bed968f1e96aa4598d8dbe3a6e8a34dded3dc2 (diff) |
replace strncpy to mir_strncpy
git-svn-id: http://svn.miranda-ng.org/main/trunk@13785 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/HTTPServer/src/IndexHTML.cpp')
-rw-r--r-- | plugins/HTTPServer/src/IndexHTML.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/HTTPServer/src/IndexHTML.cpp b/plugins/HTTPServer/src/IndexHTML.cpp index a2ae11602f..3a0dc74c16 100644 --- a/plugins/HTTPServer/src/IndexHTML.cpp +++ b/plugins/HTTPServer/src/IndexHTML.cpp @@ -62,7 +62,7 @@ bool LoadIndexHTMLTemplate() { char szDestBuf[10000];
char* pszDestBuf = szDestBuf;
- strncpy(pszBuf, szPluginPath, SIZEOF(szBuf)-1);
+ mir_strncpy(pszBuf, szPluginPath, SIZEOF(szBuf)-1);
mir_strncat(pszBuf, szIndexHTMLTemplateFile, SIZEOF(szBuf) - mir_strlen(szBuf));
HANDLE hFile = CreateFile(pszBuf, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE,
@@ -139,7 +139,7 @@ bool LoadIndexHTMLTemplate() { do {
if (*pszBuf == ',') {
*pszBuf = ':';
- strncpy(pszDestBuf, pszParameterBegin, MAX_PARAM_LENGTH);
+ mir_strncpy(pszDestBuf, pszParameterBegin, MAX_PARAM_LENGTH);
pszDestBuf += MAX_PARAM_LENGTH;
pszParameterBegin = pszBuf + 1;
@@ -152,7 +152,7 @@ bool LoadIndexHTMLTemplate() { break;
*pszBuf = ':';
- strncpy(pszDestBuf, pszParameterBegin, MAX_PARAM_LENGTH);
+ mir_strncpy(pszDestBuf, pszParameterBegin, MAX_PARAM_LENGTH);
pszDestBuf += MAX_PARAM_LENGTH;
*pcParamCount = iParamCount;
@@ -283,7 +283,7 @@ bool bCreateIndexHTML(const char * pszRealPath, const char * pszIndexPath, // check if directory exists
char szMask[MAX_PATH];
- strncpy(szMask, pszRealPath, MAX_PATH- 1);
+ mir_strncpy(szMask, pszRealPath, MAX_PATH- 1);
mir_strncat(szMask, "*", SIZEOF(szMask) - mir_strlen(szMask));
WIN32_FIND_DATAA fdFindFileData;
@@ -319,14 +319,14 @@ bool bCreateIndexHTML(const char * pszRealPath, const char * pszIndexPath, bool bEvenOdd = 0;
bool bKnownFileType = false;
- strncpy(szBuffer, pszSrvPath, SIZEOF(szBuffer)-1);
+ mir_strncpy(szBuffer, pszSrvPath, SIZEOF(szBuffer)-1);
char* pszTemp = strrchr(szBuffer, '/');
if (pszTemp)
*pszTemp = '\0';
pszTemp = strrchr(szBuffer, '/');
if (pszTemp)
- strncpy(szName, pszTemp + 1, SIZEOF(szName)-1);
+ mir_strncpy(szName, pszTemp + 1, SIZEOF(szName)-1);
if (szName[0] == '\0')
mir_strcpy(szName, "my Miranda Webserver");
@@ -470,7 +470,7 @@ bool bCreateIndexHTML(const char * pszRealPath, const char * pszIndexPath, } else {
for (byte i = 0; i < iParamCount; i++) {
char szParam[MAX_PARAM_LENGTH+1];
- strncpy(szParam, pszParam, MAX_PARAM_LENGTH);
+ mir_strncpy(szParam, pszParam, MAX_PARAM_LENGTH);
szParam[MAX_PARAM_LENGTH] = '\0';
char* pszTmp = strchr(szParam, ':');
if (pszTmp)
|