From 6e2b6b31bae6d69bff5271451e73eb08637b8118 Mon Sep 17 00:00:00 2001 From: Rozhuk Ivan Date: Tue, 2 Dec 2014 03:47:27 +0000 Subject: mir_sntprintf(..., _T("%s"), ...) -> _tcsncpy_s(..., ..., _TRUNCATE) fix some x64 ptr truncations git-svn-id: http://svn.miranda-ng.org/main/trunk@11211 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/ConnectionNotify/src/ConnectionNotify.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins/ConnectionNotify/src/ConnectionNotify.cpp') diff --git a/plugins/ConnectionNotify/src/ConnectionNotify.cpp b/plugins/ConnectionNotify/src/ConnectionNotify.cpp index 0513ea98a6..1a42fb6794 100644 --- a/plugins/ConnectionNotify/src/ConnectionNotify.cpp +++ b/plugins/ConnectionNotify/src/ConnectionNotify.cpp @@ -639,7 +639,7 @@ INT_PTR TMLoadIcon(WPARAM wParam,LPARAM lParam) case PLI_OFFLINE: id=IDI_ICON2; break; default: return 0; } - return (int)LoadImage(hInst, MAKEINTRESOURCE(id), IMAGE_ICON, GetSystemMetrics(wParam&PLIF_SMALL?SM_CXSMICON:SM_CXICON), GetSystemMetrics(wParam&PLIF_SMALL?SM_CYSMICON:SM_CYICON), 0); + return (INT_PTR)LoadImage(hInst, MAKEINTRESOURCE(id), IMAGE_ICON, GetSystemMetrics(wParam&PLIF_SMALL?SM_CXSMICON:SM_CXICON), GetSystemMetrics(wParam&PLIF_SMALL?SM_CYSMICON:SM_CYICON), 0); } //======================================================= //SetStatus @@ -816,11 +816,11 @@ void showMsg(TCHAR *pName, DWORD pid,TCHAR *intIp,TCHAR *extIp,int intPort,int e } ppd.PluginWindowProc = PopupDlgProc; - ppd.iSeconds=settingInterval1; + ppd.iSeconds = settingInterval1; //Now the "additional" data. - mir_sntprintf(mpd->strIntIp,_countof(mpd->strIntIp),_T("%s"),intIp); - mir_sntprintf(mpd->strExtIp,_countof(mpd->strExtIp),_T("%s"),extIp); - mir_sntprintf(mpd->PName,_countof(mpd->PName),_T("%s"),pName); + _tcsncpy_s(mpd->strIntIp, intIp, _TRUNCATE); + _tcsncpy_s(mpd->strExtIp, extIp, _TRUNCATE); + _tcsncpy_s(mpd->PName, pName, _TRUNCATE); mpd->intIntPort = intPort; mpd->intExtPort = extPort; mpd->Pid = pid; -- cgit v1.2.3