diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2015-12-31 07:52:57 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2015-12-31 07:52:57 +0000 |
commit | 41d90590a71a82bc63e4fe6ac9c01f2361d569fc (patch) | |
tree | f31dea82ec7856de5d15885020d024359faaa008 | |
parent | c54a3deedb05a5af983bcc6092aaefbc22519726 (diff) |
MRA: coverity fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@15972 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | protocols/MRA/src/Mra_functions.cpp | 4 | ||||
-rw-r--r-- | protocols/MRA/src/Mra_proto.cpp | 1 |
2 files changed, 2 insertions, 3 deletions
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 {
|