diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/stdfile/filerecvdlg.cpp | 2 | ||||
-rw-r--r-- | src/core/stdfile/filesenddlg.cpp | 2 | ||||
-rw-r--r-- | src/core/stdurl/urldialogs.cpp | 2 | ||||
-rw-r--r-- | src/mir_core/langpack.cpp | 4 | ||||
-rw-r--r-- | src/mir_core/path.cpp | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/src/core/stdfile/filerecvdlg.cpp b/src/core/stdfile/filerecvdlg.cpp index 9509e14dda..8a1ff1b5b7 100644 --- a/src/core/stdfile/filerecvdlg.cpp +++ b/src/core/stdfile/filerecvdlg.cpp @@ -272,7 +272,7 @@ INT_PTR CALLBACK DlgProcRecvFile(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l switch (ci.type) {
case CNFT_ASCIIZ:
hasName = 1;
- mir_snprintf(buf, SIZEOF(buf), "%s", ci.pszVal);
+ strncpy_s(buf, (char*)ci.pszVal, _TRUNCATE);
mir_free(ci.pszVal);
break;
case CNFT_DWORD:
diff --git a/src/core/stdfile/filesenddlg.cpp b/src/core/stdfile/filesenddlg.cpp index f9be264353..9c98a4f108 100644 --- a/src/core/stdfile/filesenddlg.cpp +++ b/src/core/stdfile/filesenddlg.cpp @@ -251,7 +251,7 @@ INT_PTR CALLBACK DlgProcSendFile(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l switch (ci.type) {
case CNFT_ASCIIZ:
hasName = 1;
- mir_snprintf(buf, SIZEOF(buf), "%s", ci.pszVal);
+ strncpy_s(buf, (char*)ci.pszVal, _TRUNCATE);
mir_free(ci.pszVal);
break;
case CNFT_DWORD:
diff --git a/src/core/stdurl/urldialogs.cpp b/src/core/stdurl/urldialogs.cpp index 9911a05f83..0bd93f1190 100644 --- a/src/core/stdurl/urldialogs.cpp +++ b/src/core/stdurl/urldialogs.cpp @@ -50,7 +50,7 @@ static void sttUpdateTitle(HWND hwndDlg, MCONTACT hContact) switch(ci.type) {
case CNFT_ASCIIZ:
hasName = 1;
- mir_snprintf(buf, SIZEOF(buf), "%s", ci.pszVal);
+ strncpy_s(buf, (char*)ci.pszVal, _TRUNCATE);
mir_free(ci.pszVal);
break;
case CNFT_DWORD:
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);
|