summaryrefslogtreecommitdiff
path: root/plugins/HTTPServer
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2015-04-09 18:53:19 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2015-04-09 18:53:19 +0000
commit5cd6d51c8b23a429f1017f96e4db2f6864a63c70 (patch)
tree906c47d943ee3e804158f7d5bd14c7ba40bfa51e /plugins/HTTPServer
parent7c1f6c82a6bf7ea49c5b9566f0b3e62efac24602 (diff)
HTTPServer:
- Minor fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@12715 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/HTTPServer')
-rw-r--r--plugins/HTTPServer/src/IndexHTML.cpp4
-rw-r--r--plugins/HTTPServer/src/main.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/plugins/HTTPServer/src/IndexHTML.cpp b/plugins/HTTPServer/src/IndexHTML.cpp
index bf6b139529..89fc56f157 100644
--- a/plugins/HTTPServer/src/IndexHTML.cpp
+++ b/plugins/HTTPServer/src/IndexHTML.cpp
@@ -319,14 +319,14 @@ bool bCreateIndexHTML(const char * pszRealPath, const char * pszIndexPath,
bool bEvenOdd = 0;
bool bKnownFileType = false;
- strcpy(szBuffer, pszSrvPath);
+ strncpy(szBuffer, pszSrvPath, SIZEOF(szBuffer)-1);
char* pszTemp = strrchr(szBuffer, '/');
if (pszTemp)
*pszTemp = '\0';
pszTemp = strrchr(szBuffer, '/');
if (pszTemp)
- strcpy(szName, pszTemp + 1);
+ strncpy(szName, pszTemp + 1, SIZEOF(szName)-1);
if (szName[0] == '\0')
strcpy(szName, "my Miranda Webserver");
diff --git a/plugins/HTTPServer/src/main.cpp b/plugins/HTTPServer/src/main.cpp
index d2ababd31b..89b61986c6 100644
--- a/plugins/HTTPServer/src/main.cpp
+++ b/plugins/HTTPServer/src/main.cpp
@@ -728,11 +728,11 @@ int MainInit(WPARAM /*wparam*/, LPARAM /*lparam*/) {
share.pszRealPath = szRealPath;
share.dwMaxRealPath = sizeof(szRealPath);
- strncpy(share.pszRealPath, p[0], SIZEOF(share.pszRealPath) - 1);
+ strcpy(share.pszRealPath, p[0]);
share.pszSrvPath = szSrvPath;
share.dwMaxSrvPath = sizeof(szSrvPath);
- strncpy(share.pszSrvPath, p[1], SIZEOF(share.pszSrvPath) - 1);
+ strcpy(share.pszSrvPath, p[1]);
if (CallService(MS_HTTP_ADD_CHANGE_REMOVE, 0, (LPARAM)&share))
break;