From 41d90590a71a82bc63e4fe6ac9c01f2361d569fc Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Thu, 31 Dec 2015 07:52:57 +0000 Subject: MRA: coverity fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@15972 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/MRA/src/Mra_functions.cpp | 4 ++-- protocols/MRA/src/Mra_proto.cpp | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'protocols') diff --git a/protocols/MRA/src/Mra_functions.cpp b/protocols/MRA/src/Mra_functions.cpp index bdbae4e273..c2ab7efd85 100644 --- a/protocols/MRA/src/Mra_functions.cpp +++ b/protocols/MRA/src/Mra_functions.cpp @@ -656,7 +656,7 @@ void CMraProto::MraUpdateEmailStatus(const CMStringA &pszFrom, const CMStringA & else _tcsncpy_s(szStatusText, szMailBoxStatus, _TRUNCATE); if (bTrayIconNewMailNotify) { - char szServiceFunction[MAX_PATH], *pszServiceFunctionName; + char szServiceFunction[MAX_PATH] = { 0 }, *pszServiceFunctionName; CLISTEVENT cle = { 0 }; cle.cbSize = sizeof(cle); @@ -669,7 +669,7 @@ void CMraProto::MraUpdateEmailStatus(const CMStringA &pszFrom, const CMStringA & cle.ptszTooltip = szStatusText; if (getByte("TrayIconNewMailClkToInbox", MRA_DEFAULT_TRAYICON_NEW_MAIL_CLK_TO_INBOX)) { - strncpy(szServiceFunction, m_szModuleName, MAX_PATH); + strncpy(szServiceFunction, m_szModuleName, MAX_PATH - 1); pszServiceFunctionName = szServiceFunction + mir_strlen(m_szModuleName); memcpy(pszServiceFunctionName, MRA_GOTO_INBOX, sizeof(MRA_GOTO_INBOX)); cle.pszService = szServiceFunction; diff --git a/protocols/MRA/src/Mra_proto.cpp b/protocols/MRA/src/Mra_proto.cpp index 82a25af521..caeb8819ae 100644 --- a/protocols/MRA/src/Mra_proto.cpp +++ b/protocols/MRA/src/Mra_proto.cpp @@ -1240,7 +1240,6 @@ bool CMraProto::CmdClist2(BinBuffer &buf) if (hContact) { // already in list, remove the duplicate if (GetContactBasicInfoW(hContact, &dwTemp, NULL, NULL, NULL, NULL, NULL, NULL, NULL) == NO_ERROR && dwTemp != -1) { - dwTemp = dwTemp; _CrtDbgBreak(); } else { -- cgit v1.2.3