From 6fcfba2c46a456677b5825a899469ba4e8905448 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sat, 23 May 2015 17:49:58 +0000 Subject: replace strncpy to mir_strncpy git-svn-id: http://svn.miranda-ng.org/main/trunk@13785 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/HTTPServer/src/IndexHTML.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'plugins/HTTPServer/src/IndexHTML.cpp') 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) -- cgit v1.2.3