From a787fdfb4a67db47dd46ca537de4eac426d71dde Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Sat, 3 Oct 2015 17:40:32 +0000 Subject: PluginUpdater: coverity fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@15502 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/PluginUpdater/pu_stub/pu_stub.cpp | 2 +- plugins/PluginUpdater/src/DlgListNew.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/PluginUpdater/pu_stub/pu_stub.cpp b/plugins/PluginUpdater/pu_stub/pu_stub.cpp index 19f5aade7b..8b3e25896d 100644 --- a/plugins/PluginUpdater/pu_stub/pu_stub.cpp +++ b/plugins/PluginUpdater/pu_stub/pu_stub.cpp @@ -80,7 +80,7 @@ int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE, LPTSTR lpCmdLine, int) log( L"Entering the reading cycle..."); - BYTE szReadBuffer[1024]; + BYTE szReadBuffer[1024] = { 0 }; DWORD dwBytes; while ( ReadFile(hPipe, szReadBuffer, sizeof(szReadBuffer), &dwBytes, NULL)) { DWORD dwAction = *(DWORD*)szReadBuffer; diff --git a/plugins/PluginUpdater/src/DlgListNew.cpp b/plugins/PluginUpdater/src/DlgListNew.cpp index da34ebfc80..860400c560 100644 --- a/plugins/PluginUpdater/src/DlgListNew.cpp +++ b/plugins/PluginUpdater/src/DlgListNew.cpp @@ -347,7 +347,7 @@ static FILEINFO* ServerEntryToFileInfo(const ServListEntry &hash, const TCHAR* t TCHAR tszFileName[MAX_PATH]; _tcsncpy(tszFileName, _tcsrchr(tszPath, L'\\') + 1, _countof(tszFileName)); - TCHAR *tp = _tcschr(tszFileName, L'.'); *tp = 0; + TCHAR *tp = _tcschr(tszFileName, L'.'); if (tp) *tp = 0; TCHAR tszRelFileName[MAX_PATH]; _tcsncpy(tszRelFileName, hash.m_name, MAX_PATH); -- cgit v1.2.3