summaryrefslogtreecommitdiff
path: root/plugins/Scriver
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Scriver')
-rw-r--r--plugins/Scriver/src/infobar.cpp4
-rw-r--r--plugins/Scriver/src/msgoptions.cpp6
-rw-r--r--plugins/Scriver/src/msgtimedout.cpp2
3 files changed, 6 insertions, 6 deletions
diff --git a/plugins/Scriver/src/infobar.cpp b/plugins/Scriver/src/infobar.cpp
index 8917bb1d78..c2e53271c8 100644
--- a/plugins/Scriver/src/infobar.cpp
+++ b/plugins/Scriver/src/infobar.cpp
@@ -79,9 +79,9 @@ void RefreshInfobar(InfobarWindowData* idat)
TCHAR szText[2048];
SETTEXTEX st;
if ( szXStatusMsg && *szXStatusMsg )
- mir_sntprintf(szText, 2047, _T("%s (%s)"), TranslateTS(szXStatusName), szXStatusMsg);
+ mir_sntprintf(szText, SIZEOF(szText), _T("%s (%s)"), TranslateTS(szXStatusName), szXStatusMsg);
else
- mir_sntprintf(szText, 2047, _T("%s"), TranslateTS(szXStatusName));
+ _tcsncpy_s(szText, TranslateTS(szXStatusName), _TRUNCATE);
st.flags = ST_DEFAULT;
st.codepage = 1200;
SendDlgItemMessage(hwnd, IDC_INFOBAR_NAME, EM_SETTEXTEX, (WPARAM) &st, (LPARAM)szContactName);
diff --git a/plugins/Scriver/src/msgoptions.cpp b/plugins/Scriver/src/msgoptions.cpp
index 0f0a8d85a4..682bf76cbe 100644
--- a/plugins/Scriver/src/msgoptions.cpp
+++ b/plugins/Scriver/src/msgoptions.cpp
@@ -112,8 +112,8 @@ void RegisterFontServiceFonts()
{
int i;
FontIDT fid = { sizeof(fid) };
- mir_sntprintf(fid.group, SIZEOF(fid.group), _T("%s"), LPGENT("Messaging"));
- mir_sntprintf(fid.backgroundGroup, SIZEOF(fid.backgroundGroup), _T("%s"), LPGENT("Messaging"));
+ _tcsncpy_s(fid.group, LPGENT("Messaging"), _TRUNCATE);
+ _tcsncpy_s(fid.backgroundGroup, LPGENT("Messaging"), _TRUNCATE);
strncpy(fid.dbSettingsGroup, SRMMMOD, SIZEOF(fid.dbSettingsGroup));
fid.flags = FIDF_DEFAULTVALID | FIDF_DEFAULTVALID;
for (i = 0; i < SIZEOF(fontOptionsList); i++) {
@@ -133,7 +133,7 @@ void RegisterFontServiceFonts()
}
ColourIDT cid = { sizeof(cid) };
- mir_sntprintf(cid.group, SIZEOF(cid.group), _T("%s"), LPGENT("Messaging"));
+ _tcsncpy_s(cid.group, LPGENT("Messaging"), _TRUNCATE);
strncpy(cid.dbSettingsGroup, SRMMMOD, SIZEOF(fid.dbSettingsGroup));
cid.flags = 0;
for (i = 0; i < SIZEOF(colourOptionsList); i++) {
diff --git a/plugins/Scriver/src/msgtimedout.cpp b/plugins/Scriver/src/msgtimedout.cpp
index 317d8b6ef4..6a7bc06f49 100644
--- a/plugins/Scriver/src/msgtimedout.cpp
+++ b/plugins/Scriver/src/msgtimedout.cpp
@@ -52,7 +52,7 @@ INT_PTR CALLBACK ErrorDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar
if (ewd->szName)
mir_sntprintf(szText, SIZEOF(szText), _T("%s - %s"), TranslateT("Send Error"), ewd->szName);
else
- mir_sntprintf(szText, SIZEOF(szText), _T("%s"), TranslateT("Send Error"));
+ _tcsncpy_s(szText, TranslateT("Send Error"), _TRUNCATE);
SetWindowText(hwndDlg, szText);
GetWindowRect(hwndDlg, &rc);