From 21c7ceae52c256d77b6f3b2bc4af2bca6ad7c23d Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sat, 16 May 2015 18:43:21 +0000 Subject: fix for strncat use git-svn-id: http://svn.miranda-ng.org/main/trunk@13646 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/SkypeStatusChange/src/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/SkypeStatusChange') diff --git a/plugins/SkypeStatusChange/src/main.cpp b/plugins/SkypeStatusChange/src/main.cpp index 380b01f39b..3eef23543d 100644 --- a/plugins/SkypeStatusChange/src/main.cpp +++ b/plugins/SkypeStatusChange/src/main.cpp @@ -179,7 +179,7 @@ LRESULT APIENTRY SkypeAPI_WindowProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp) char szSkypeCmd[BUFFER_SIZE]; const char szSkypeCmdSetStatus[] = "SET USERSTATUS "; ::strncpy_s(szSkypeCmd,szSkypeCmdSetStatus,sizeof(szSkypeCmdSetStatus)/sizeof(szSkypeCmdSetStatus[0])); - ::strncat_s(szSkypeCmd,ms.m_pszSkypeStatus,strlen(ms.m_pszSkypeStatus)); + ::strncat_s(szSkypeCmd, ms.m_pszSkypeStatus, SIZEOF(szSkypeCmd) - mir_strlen(szSkypeCmd)); DWORD cLength = static_cast(strlen(szSkypeCmd)); COPYDATASTRUCT oCopyData; @@ -201,7 +201,7 @@ LRESULT APIENTRY SkypeAPI_WindowProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp) const char szSkypeCmdSetStatusMsg[] = "SET PROFILE MOOD_TEXT "; ::strncpy_s(szSkypeCmd,szSkypeCmdSetStatusMsg,sizeof(szSkypeCmdSetStatusMsg)/sizeof(szSkypeCmdSetStatusMsg[0])); - ::strncat_s(szSkypeCmd,pMsg,strlen(pMsg)); + ::strncat_s(szSkypeCmd, pMsg, SIZEOF(szSkypeCmd) - mir_strlen(szSkypeCmd)); mir_free(pMsg); DWORD cLength = static_cast(strlen(szSkypeCmd)); -- cgit v1.2.3