summaryrefslogtreecommitdiff
path: root/src/mir_core
diff options
context:
space:
mode:
authorRozhuk Ivan <rozhuk.im@gmail.com>2014-12-02 05:19:23 +0000
committerRozhuk Ivan <rozhuk.im@gmail.com>2014-12-02 05:19:23 +0000
commit114f83d5d8a73b3f1435e09b1d91aff843e4ce15 (patch)
tree0805188bf6bcf5749d1e76d5d1e73ccb6cf41cc4 /src/mir_core
parent6e2b6b31bae6d69bff5271451e73eb08637b8118 (diff)
mir_snprintf(..., "%s", ...) -> strncpy_s(...)
build fix to prevous commit git-svn-id: http://svn.miranda-ng.org/main/trunk@11212 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/mir_core')
-rw-r--r--src/mir_core/langpack.cpp4
-rw-r--r--src/mir_core/path.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/mir_core/langpack.cpp b/src/mir_core/langpack.cpp
index 2e0b692cc4..362e1230ba 100644
--- a/src/mir_core/langpack.cpp
+++ b/src/mir_core/langpack.cpp
@@ -329,8 +329,8 @@ static int LoadLangDescr(LANGPACK_INFO &lpinfo, FILE *fp, char *line, int &start
return 3;
*pszColon++ = 0;
- if (!mir_strcmp(line, "Language")) {
- mir_snprintf(szLanguage, SIZEOF(szLanguage), "%s", pszColon);
+ if (!mir_strcmp(line, "Language")) {
+ strncpy_s(szLanguage, pszColon, _TRUNCATE);
lrtrim(szLanguage);
}
else if (!mir_strcmp(line, "Last-Modified-Using")) {
diff --git a/src/mir_core/path.cpp b/src/mir_core/path.cpp
index fbc3cff04b..d4148f457d 100644
--- a/src/mir_core/path.cpp
+++ b/src/mir_core/path.cpp
@@ -67,7 +67,7 @@ MIR_CORE_DLL(int) PathToAbsolute(const char *pSrc, char *pOut, const char *base)
char buf[MAX_PATH];
if (pSrc[0] < ' ')
- return mir_snprintf(pOut, MAX_PATH, "%s", pSrc);
+ strncpy_s(pOut, MAX_PATH, pSrc, _TRUNCATE);
if (PathIsAbsolute(pSrc))
return GetFullPathNameA(pSrc, MAX_PATH, pOut, NULL);