• R/O
  • SSH
  • HTTPS

tortoisesvn: コミット


コミットメタ情報

リビジョン28734 (tree)
日時2020-02-02 05:12:57
作者csware

ログメッセージ

Use less SecureZeroMemory

変更サマリ

差分

--- trunk/src/LogCache/Streams/HuffmanEncoder.cpp (revision 28733)
+++ trunk/src/LogCache/Streams/HuffmanEncoder.cpp (revision 28734)
@@ -1,4 +1,4 @@
1-// TortoiseSVN - a Windows shell extension for easy version control
1+// TortoiseSVN - a Windows shell extension for easy version control
22
33 // Copyright (C) 2007-2009, 2012, 2014 - TortoiseSVN
44
@@ -37,8 +37,7 @@
3737 {
3838 // keep intermediate results
3939
40- DWORD localCount[sizeof (count_block_type)][BUCKET_COUNT];
41- SecureZeroMemory (localCount, sizeof (localCount));
40+ DWORD localCount[sizeof(count_block_type)][BUCKET_COUNT] = {0};
4241
4342 // main loop
4443
--- trunk/src/SVN/SVNStatusListCtrlHelpers.cpp (revision 28733)
+++ trunk/src/SVN/SVNStatusListCtrlHelpers.cpp (revision 28734)
@@ -1,4 +1,4 @@
1-// TortoiseSVN - a Windows shell extension for easy version control
1+// TortoiseSVN - a Windows shell extension for easy version control
22
33 // Copyright (C) 2008-2015 - TortoiseSVN
44
@@ -828,8 +828,7 @@
828828 {
829829 // extract order of used columns from order of all columns
830830
831- int order[SVNSLC_MAXCOLUMNCOUNT+1];
832- SecureZeroMemory (order, sizeof (order));
831+ int order[SVNSLC_MAXCOLUMNCOUNT + 1] = {0};
833832
834833 std::vector<int> gridColumnOrder = GetGridColumnOrder();
835834 std::copy (gridColumnOrder.begin(), gridColumnOrder.end(), stdext::checked_array_iterator<int*>(&order[0], sizeof(order)));
--- trunk/src/TSVNCache/CacheInterface.cpp (revision 28733)
+++ trunk/src/TSVNCache/CacheInterface.cpp (revision 28734)
@@ -1,4 +1,4 @@
1-// TortoiseSVN - a Windows shell extension for easy version control
1+// TortoiseSVN - a Windows shell extension for easy version control
22
33 // External Cache Copyright (C) 2007,2009-2012, 2014-2015 - TortoiseSVN
44
@@ -109,8 +109,7 @@
109109 NULL)) // don't set maximum time
110110 {
111111 DWORD cbWritten;
112- TSVNCacheCommand cmd;
113- SecureZeroMemory(&cmd, sizeof(TSVNCacheCommand));
112+ TSVNCacheCommand cmd = {0};
114113 cmd.command = command;
115114 if (path)
116115 wcsncpy_s(cmd.path, path, _TRUNCATE);
--- trunk/src/TSVNCache/DirectoryWatcher.cpp (revision 28733)
+++ trunk/src/TSVNCache/DirectoryWatcher.cpp (revision 28734)
@@ -1,4 +1,4 @@
1-// TortoiseSVN - a Windows shell extension for easy version control
1+// TortoiseSVN - a Windows shell extension for easy version control
22
33 // External Cache Copyright (C) 2005-2008, 2011-2012, 2014-2015 - TortoiseSVN
44
@@ -322,8 +322,7 @@
322322 break;
323323 }
324324
325- DEV_BROADCAST_HANDLE NotificationFilter;
326- SecureZeroMemory(&NotificationFilter, sizeof(NotificationFilter));
325+ DEV_BROADCAST_HANDLE NotificationFilter = {0};
327326 NotificationFilter.dbch_size = sizeof(DEV_BROADCAST_HANDLE);
328327 NotificationFilter.dbch_devicetype = DBT_DEVTYP_HANDLE;
329328 NotificationFilter.dbch_handle = hDir;
--- trunk/src/TortoiseMerge/FileTextLines.cpp (revision 28733)
+++ trunk/src/TortoiseMerge/FileTextLines.cpp (revision 28734)
@@ -339,8 +339,7 @@
339339 }
340340
341341 // fill in the lines into the array
342- size_t countEOLs[EOL__COUNT];
343- SecureZeroMemory(countEOLs, sizeof(countEOLs));
342+ size_t countEOLs[EOL__COUNT] = {0};
344343 CFileTextLine oTextLine;
345344 for (int i = nReadChars; i; --i)
346345 {
--- trunk/src/TortoiseProc/AppUtils.cpp (revision 28733)
+++ trunk/src/TortoiseProc/AppUtils.cpp (revision 28734)
@@ -1298,8 +1298,7 @@
12981298 , DWORD effects
12991299 , const std::vector<CHARRANGE>& positions)
13001300 {
1301- CHARFORMAT2 format;
1302- SecureZeroMemory(&format, sizeof(CHARFORMAT2));
1301+ CHARFORMAT2 format = {0};
13031302 format.cbSize = sizeof(CHARFORMAT2);
13041303 format.dwMask = mask;
13051304 format.dwEffects = effects;
@@ -1317,8 +1316,7 @@
13171316
13181317 void CAppUtils::SetCharFormat(CWnd* window, DWORD mask, DWORD effects )
13191318 {
1320- CHARFORMAT2 format;
1321- SecureZeroMemory(&format, sizeof(CHARFORMAT2));
1319+ CHARFORMAT2 format = {0};
13221320 format.cbSize = sizeof(CHARFORMAT2);
13231321 format.dwMask = mask;
13241322 format.dwEffects = effects;
--- trunk/src/TortoiseProc/LogDialog/LogDlg.cpp (revision 28733)
+++ trunk/src/TortoiseProc/LogDialog/LogDlg.cpp (revision 28734)
@@ -3726,8 +3726,7 @@
37263726 {
37273727 // Get the selected state of the
37283728 // item being drawn.
3729- LVITEM rItem;
3730- SecureZeroMemory(&rItem, sizeof(LVITEM));
3729+ LVITEM rItem = {0};
37313730 rItem.mask = LVIF_STATE;
37323731 rItem.iItem = (int)pLVCD->nmcd.dwItemSpec;
37333732 rItem.stateMask = LVIS_SELECTED | LVIS_FOCUSED;
--- trunk/src/TortoiseProc/RepositoryBar.cpp (revision 28733)
+++ trunk/src/TortoiseProc/RepositoryBar.cpp (revision 28734)
@@ -80,8 +80,7 @@
8080 CFont *font = parent->GetFont();
8181 CString temp;
8282
83- REBARINFO rbi;
84- SecureZeroMemory(&rbi, sizeof rbi);
83+ REBARINFO rbi = {0};
8584 rbi.cbSize = sizeof rbi;
8685 rbi.fMask = 0;
8786 rbi.himl = (HIMAGELIST)0;
@@ -89,8 +88,7 @@
8988 if (!this->SetBarInfo(&rbi))
9089 return false;
9190
92- REBARBANDINFO rbbi;
93- SecureZeroMemory(&rbbi, sizeof rbbi);
91+ REBARBANDINFO rbbi = {0};
9492 rbbi.cbSize = REBARBANDINFO_V6_SIZE;
9593 rbbi.fMask = RBBIM_TEXT | RBBIM_STYLE | RBBIM_CHILD | RBBIM_CHILDSIZE | RBBIM_SIZE;
9694 rbbi.fStyle = RBBS_NOGRIPPER | RBBS_FIXEDBMP;
--- trunk/src/TortoiseProc/RevisionGraph/RevisionGraphDlg.cpp (revision 28733)
+++ trunk/src/TortoiseProc/RevisionGraph/RevisionGraphDlg.cpp (revision 28734)
@@ -251,8 +251,7 @@
251251 , L"200%"
252252 , NULL};
253253
254- COMBOBOXEXITEM cbei;
255- SecureZeroMemory(&cbei, sizeof cbei);
254+ COMBOBOXEXITEM cbei = {0};
256255 cbei.mask = CBEIF_TEXT;
257256
258257 for (TCHAR** text = texts; *text != NULL; ++text)
--- trunk/src/TortoiseProc/RevisionGraph/RevisionGraphWnd.cpp (revision 28733)
+++ trunk/src/TortoiseProc/RevisionGraph/RevisionGraphWnd.cpp (revision 28734)
@@ -850,11 +850,9 @@
850850 rect = GetGraphRect();
851851 rect.bottom = (LONG)(float(rect.Height()) * m_fZoomFactor);
852852 rect.right = (LONG)(float(rect.Width()) * m_fZoomFactor);
853- BITMAPINFO bmi;
853+ BITMAPINFO bmi = {0};
854854 HBITMAP hbm;
855855 LPBYTE pBits;
856- // Initialize header to 0s.
857- SecureZeroMemory(&bmi, sizeof(bmi));
858856 // Fill out the fields you care about.
859857 bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
860858 bmi.bmiHeader.biWidth = rect.Width();
--- trunk/src/TortoiseProc/Settings/SetOverlayIcons.cpp (revision 28733)
+++ trunk/src/TortoiseProc/Settings/SetOverlayIcons.cpp (revision 28734)
@@ -325,8 +325,7 @@
325325
326326 HICON CSetOverlayIcons::GetFileIcon(LPCTSTR fileType, bool bSmallIcons, DWORD attributes)
327327 {
328- SHFILEINFO sfi;
329- SecureZeroMemory(&sfi, sizeof sfi);
328+ SHFILEINFO sfi = {0};
330329
331330 UINT flags = SHGFI_ICON | SHGFI_USEFILEATTRIBUTES;
332331 if (bSmallIcons)
--- trunk/src/TortoiseShell/ColumnProvider.cpp (revision 28733)
+++ trunk/src/TortoiseShell/ColumnProvider.cpp (revision 28734)
@@ -186,8 +186,7 @@
186186
187187 // reserve for the path + trailing \0
188188
189- TCHAR buf[MAX_STATUS_STRING_LENGTH+1];
190- SecureZeroMemory(buf, sizeof(buf));
189+ TCHAR buf[MAX_STATUS_STRING_LENGTH + 1] = {0};
191190 switch (pscid->pid)
192191 {
193192 case 0: // SVN Status
@@ -378,8 +377,7 @@
378377
379378 TCHAR urlpath[INTERNET_MAX_URL_LENGTH+1];
380379
381- URL_COMPONENTS urlComponents;
382- SecureZeroMemory(&urlComponents, sizeof(URL_COMPONENTS));
380+ URL_COMPONENTS urlComponents = {0};
383381 urlComponents.dwStructSize = sizeof(URL_COMPONENTS);
384382 urlComponents.dwUrlPathLength = INTERNET_MAX_URL_LENGTH;
385383 urlComponents.lpszUrlPath = urlpath;
--- trunk/src/TortoiseShell/ContextMenu.cpp (revision 28733)
+++ trunk/src/TortoiseShell/ContextMenu.cpp (revision 28734)
@@ -1103,8 +1103,7 @@
11031103 int count = GetMenuItemCount(hMenu);
11041104 for (int i=0; i<count; ++i)
11051105 {
1106- MENUITEMINFO miif;
1107- SecureZeroMemory(&miif, sizeof(MENUITEMINFO));
1106+ MENUITEMINFO miif = {0};
11081107 miif.cbSize = sizeof(MENUITEMINFO);
11091108 miif.fMask = MIIM_DATA;
11101109 miif.dwTypeData = menubuf;
@@ -1204,8 +1203,7 @@
12041203 temp.erase(std::remove(temp.begin(), temp.end(), '&'), temp.end());
12051204 wcscpy_s(stringtablebuffer, temp.c_str());
12061205 }
1207- MENUITEMINFO menuiteminfo;
1208- SecureZeroMemory(&menuiteminfo, sizeof(menuiteminfo));
1206+ MENUITEMINFO menuiteminfo = {0};
12091207 menuiteminfo.cbSize = sizeof(menuiteminfo);
12101208 menuiteminfo.fType = MFT_STRING;
12111209 menuiteminfo.dwTypeData = stringtablebuffer;
@@ -2395,8 +2393,7 @@
23952393
23962394 if (bShowIgnoreMenu)
23972395 {
2398- MENUITEMINFO menuiteminfo;
2399- SecureZeroMemory(&menuiteminfo, sizeof(menuiteminfo));
2396+ MENUITEMINFO menuiteminfo = {0};
24002397 menuiteminfo.cbSize = sizeof(menuiteminfo);
24012398 menuiteminfo.fMask = MIIM_FTYPE | MIIM_ID | MIIM_SUBMENU | MIIM_DATA | MIIM_BITMAP | MIIM_STRING;
24022399 menuiteminfo.fType = MFT_STRING;
--- trunk/src/TortoiseShell/IconOverlay.cpp (revision 28733)
+++ trunk/src/TortoiseShell/IconOverlay.cpp (revision 28734)
@@ -164,8 +164,7 @@
164164 {
165165 case ShellCache::exe:
166166 {
167- TSVNCacheResponse itemStatus;
168- SecureZeroMemory(&itemStatus, sizeof(itemStatus));
167+ TSVNCacheResponse itemStatus = {0};
169168 if (m_remoteCacheLink.GetStatusFromRemoteCache(CTSVNPath(pPath), &itemStatus, true))
170169 {
171170 status = (svn_wc_status_kind)itemStatus.m_Status;
--- trunk/src/TortoiseShell/RemoteCacheLink.cpp (revision 28733)
+++ trunk/src/TortoiseShell/RemoteCacheLink.cpp (revision 28734)
@@ -134,8 +134,7 @@
134134 {
135135 // now tell the cache we don't need it's command thread anymore
136136 DWORD cbWritten;
137- TSVNCacheCommand cmd;
138- SecureZeroMemory(&cmd, sizeof(TSVNCacheCommand));
137+ TSVNCacheCommand cmd = {0};
139138 cmd.command = TSVNCACHECOMMAND_END;
140139 WriteFile(
141140 m_hCommandPipe, // handle to pipe
@@ -251,8 +250,7 @@
251250 if (m_hCommandPipe)
252251 {
253252 DWORD cbWritten;
254- TSVNCacheCommand cmd;
255- SecureZeroMemory(&cmd, sizeof(TSVNCacheCommand));
253+ TSVNCacheCommand cmd = {0};
256254 cmd.command = TSVNCACHECOMMAND_RELEASE;
257255 wcsncpy_s(cmd.path, path.GetDirectory().GetWinPath(), MAX_PATH - 1);
258256 BOOL fSuccess = WriteFile(
--- trunk/src/TortoiseShell/SVNPropertyPage.cpp (revision 28733)
+++ trunk/src/TortoiseShell/SVNPropertyPage.cpp (revision 28734)
@@ -49,8 +49,7 @@
4949 return S_OK;
5050
5151 LoadLangDll();
52- PROPSHEETPAGE psp;
53- SecureZeroMemory(&psp, sizeof(PROPSHEETPAGE));
52+ PROPSHEETPAGE psp = {0};
5453 HPROPSHEETPAGE hPage;
5554
5655 CSVNPropertyPage * sheetpage = new (std::nothrow) CSVNPropertyPage(files_);
--- trunk/src/Utils/CrashReport.h (revision 28733)
+++ trunk/src/Utils/CrashReport.h (revision 28734)
@@ -1,4 +1,4 @@
1-// TortoiseSVN - a Windows shell extension for easy version control
1+// TortoiseSVN - a Windows shell extension for easy version control
22
33 // Copyright (C) 2012-2014 - TortoiseSVN
44
@@ -378,8 +378,7 @@
378378 CCrashReportTSVN(LPCTSTR appname, bool bOwnProcess = true)
379379 : m_nInstallStatus(0)
380380 {
381- ApplicationInfo appInfo;
382- SecureZeroMemory(&appInfo, sizeof(appInfo));
381+ ApplicationInfo appInfo = {0};
383382 appInfo.ApplicationInfoSize = sizeof(ApplicationInfo);
384383 appInfo.ApplicationGUID = "71040f62-f78a-4953-b5b3-5c148349fed7";
385384 appInfo.Prefix = "tsvn";
@@ -392,8 +391,7 @@
392391 appInfo.V[2] = TSVN_VERMICRO;
393392 appInfo.V[3] = TSVN_VERBUILD;
394393
395- HandlerSettings handlerSettings;
396- SecureZeroMemory(&handlerSettings, sizeof(handlerSettings));
394+ HandlerSettings handlerSettings = {0};
397395 handlerSettings.HandlerSettingsSize = sizeof(handlerSettings);
398396 handlerSettings.LeaveDumpFilesInTempFolder = FALSE;
399397 handlerSettings.UseWER = FALSE;
--- trunk/src/Utils/CrashReport_crashrpt.h (revision 28733)
+++ trunk/src/Utils/CrashReport_crashrpt.h (revision 28734)
@@ -1,4 +1,4 @@
1-// TortoiseSVN - a Windows shell extension for easy version control
1+// TortoiseSVN - a Windows shell extension for easy version control
22
33 // Copyright (C) 2012-2014, 2019 - TortoiseSVN
44
@@ -184,8 +184,7 @@
184184 //! Installs exception handlers to the caller process
185185 CCrashReportTSVN(LPCTSTR appname)
186186 {
187- CR_INSTALL_INFO info;
188- SecureZeroMemory(&info, sizeof(CR_INSTALL_INFO));
187+ CR_INSTALL_INFO info = {0};
189188 info.cb = sizeof(CR_INSTALL_INFO);
190189 info.pszAppName = appname;
191190 info.pszAppVersion = _T(STRPRODUCTVER);
--- trunk/src/Utils/CreateProcessHelper.h (revision 28733)
+++ trunk/src/Utils/CreateProcessHelper.h (revision 28734)
@@ -1,4 +1,4 @@
1-// TortoiseSVN - a Windows shell extension for easy version control
1+// TortoiseSVN - a Windows shell extension for easy version control
22
33 // Copyright (C) 2009-2010, 2013 - TortoiseSVN
44
@@ -45,8 +45,7 @@
4545 LPCTSTR commandLine, LPCTSTR currentDirectory,
4646 LPPROCESS_INFORMATION processInfo)
4747 {
48- STARTUPINFO startupInfo;
49- SecureZeroMemory(&startupInfo, sizeof(STARTUPINFO));
48+ STARTUPINFO startupInfo = {0};
5049 startupInfo.cb = sizeof(STARTUPINFO);
5150
5251 SecureZeroMemory(processInfo, sizeof(PROCESS_INFORMATION));
--- trunk/src/Utils/DllVersion.h (revision 28733)
+++ trunk/src/Utils/DllVersion.h (revision 28734)
@@ -1,4 +1,4 @@
1-// TortoiseSVN - a Windows shell extension for easy version control
1+// TortoiseSVN - a Windows shell extension for easy version control
22
33 // Copyright (C) 2012-2014 - TortoiseSVN
44
@@ -66,8 +66,7 @@
6666 {
6767 ATLENSURE(( pdwMajor != NULL) && ( pdwMinor != NULL ));
6868
69- DLLVERSIONINFO dvi;
70- SecureZeroMemory(&dvi, sizeof(dvi));
69+ DLLVERSIONINFO dvi = {0};
7170 dvi.cbSize = sizeof(dvi);
7271 HRESULT hRet = GetDllVersion(L"shell32.dll", &dvi);
7372
--- trunk/src/Utils/Hooks.cpp (revision 28733)
+++ trunk/src/Utils/Hooks.cpp (revision 28734)
@@ -647,8 +647,7 @@
647647 DWORD CHooks::RunScript(CString cmd, const CTSVNPathList& paths, CString& error, bool bWait, bool bShow)
648648 {
649649 DWORD exitcode = 0;
650- SECURITY_ATTRIBUTES sa;
651- SecureZeroMemory(&sa, sizeof(sa));
650+ SECURITY_ATTRIBUTES sa = {0};
652651 sa.nLength = sizeof(sa);
653652 sa.bInheritHandle = TRUE;
654653
@@ -706,8 +705,7 @@
706705
707706 // setup startup info, set std out/err handles
708707 // hide window
709- STARTUPINFO si;
710- SecureZeroMemory(&si, sizeof(si));
708+ STARTUPINFO si = {0};
711709 si.cb = sizeof(si);
712710 si.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW;
713711 si.hStdOutput = hOut;
@@ -714,9 +712,7 @@
714712 si.hStdError = hErr;
715713 si.wShowWindow = bShow ? SW_SHOW : SW_HIDE;
716714
717- PROCESS_INFORMATION pi;
718- SecureZeroMemory(&pi, sizeof(pi));
719-
715+ PROCESS_INFORMATION pi = {0};
720716 if (!CreateProcess(NULL, cmd.GetBuffer(), NULL, NULL, TRUE, 0, NULL, curDir.IsEmpty() ? NULL : curDir.GetWinPath(), &si, &pi))
721717 {
722718 const DWORD err = GetLastError(); // preserve the CreateProcess error
--- trunk/src/Utils/MiscUI/HistoryCombo.cpp (revision 28733)
+++ trunk/src/Utils/MiscUI/HistoryCombo.cpp (revision 28734)
@@ -110,8 +110,7 @@
110110 m_arEntries.RemoveAt(m_nMaxHistoryItems);
111111 }
112112
113- COMBOBOXEXITEM cbei;
114- SecureZeroMemory(&cbei, sizeof cbei);
113+ COMBOBOXEXITEM cbei = {0};
115114 cbei.mask = CBEIF_TEXT;
116115
117116 if (pos < 0)
--- trunk/src/Utils/MiscUI/IconMenu.cpp (revision 28733)
+++ trunk/src/Utils/MiscUI/IconMenu.cpp (revision 28734)
@@ -54,10 +54,7 @@
5454
5555 BOOL CIconMenu::SetMenuStyle(void)
5656 {
57- MENUINFO MenuInfo;
58-
59- SecureZeroMemory(&MenuInfo, sizeof(MenuInfo));
60-
57+ MENUINFO MenuInfo = {0};
6158 MenuInfo.cbSize = sizeof(MenuInfo);
6259 MenuInfo.fMask = MIM_STYLE | MIM_APPLYTOSUBMENUS;
6360 MenuInfo.dwStyle = MNS_CHECKORBMP;
--- trunk/src/Utils/MiscUI/MyGraph.cpp (revision 28733)
+++ trunk/src/Utils/MiscUI/MyGraph.cpp (revision 28734)
@@ -855,8 +855,7 @@
855855 VERIFY(fontLegend.CreatePointFont(pointFontHeight, L"Arial", &dc));
856856
857857 // Get the height of each label.
858- LOGFONT lf;
859- ::SecureZeroMemory(&lf, sizeof(lf));
858+ LOGFONT lf = {0};
860859 VERIFY(fontLegend.GetLogFont(&lf));
861860 // just in case the font height is invalid (zero), use min().
862861 int nLabelHeight = max(1l, abs(lf.lfHeight));
@@ -1599,9 +1598,7 @@
15991598 bool bOnlyDrawing /* = false */ ,
16001599 UINT uiMsgAllowed /* = WM_NULL */ )
16011600 {
1602- MSG msg;
1603- ::SecureZeroMemory(&msg, sizeof(msg));
1604-
1601+ MSG msg = {0};
16051602 while (::PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
16061603
16071604 // Do painting only.
--- trunk/src/Utils/PathUtils.cpp (revision 28733)
+++ trunk/src/Utils/PathUtils.cpp (revision 28734)
@@ -45,10 +45,8 @@
4545 auto buf = std::make_unique<TCHAR[]>(fullLen);
4646 auto internalpathbuf = std::make_unique<TCHAR[]>(fullLen);
4747 TCHAR * pPath = internalpathbuf.get();
48- SECURITY_ATTRIBUTES attribs;
48+ SECURITY_ATTRIBUTES attribs = {0};
4949
50- SecureZeroMemory(&attribs, sizeof(SECURITY_ATTRIBUTES));
51-
5250 attribs.nLength = sizeof(SECURITY_ATTRIBUTES);
5351 attribs.bInheritHandle = FALSE;
5452
--- trunk/src/Utils/PersonalDictionary.cpp (revision 28733)
+++ trunk/src/Utils/PersonalDictionary.cpp (revision 28734)
@@ -54,7 +54,6 @@
5454
5555 std::ifstream File;
5656 char filepath[MAX_PATH + 1] = { 0 };
57- SecureZeroMemory(filepath, sizeof(filepath));
5857 WideCharToMultiByte(CP_ACP, NULL, path, -1, filepath, _countof(filepath)-1, NULL, NULL);
5958 File.open(filepath);
6059 if (!File.good())
@@ -112,7 +111,6 @@
112111
113112 std::ofstream File;
114113 char filepath[MAX_PATH + 1] = { 0 };
115- SecureZeroMemory(filepath, sizeof(filepath));
116114 WideCharToMultiByte(CP_ACP, NULL, path, -1, filepath, _countof(filepath)-1, NULL, NULL);
117115 File.open(filepath, std::ios_base::binary);
118116 for (std::set<CString>::iterator it = dict.begin(); it != dict.end(); ++it)
--- trunk/src/Utils/QuickHash.h (revision 28733)
+++ trunk/src/Utils/QuickHash.h (revision 28734)
@@ -1,4 +1,4 @@
1-// TortoiseSVN - a Windows shell extension for easy version control
1+// TortoiseSVN - a Windows shell extension for easy version control
22
33 // Copyright (C) 2007-2010, 2012, 2013-2015 - TortoiseSVN
44
@@ -326,8 +326,7 @@
326326 std::unique_ptr<TPair[]> tempBuffer (new TPair[MAX_CLUSTERS * clusterSize]);
327327 TPair* temp = tempBuffer.get();
328328
329- size_t used[MAX_CLUSTERS];
330- SecureZeroMemory(used, sizeof(used));
329+ size_t used[MAX_CLUSTERS] = {0};
331330
332331 // sort main: fill bucket chains
333332
--- trunk/src/Utils/SysImageList.cpp (revision 28733)
+++ trunk/src/Utils/SysImageList.cpp (revision 28734)
@@ -1,4 +1,4 @@
1-// TortoiseSVN - a Windows shell extension for easy version control
1+// TortoiseSVN - a Windows shell extension for easy version control
22
33 // Copyright (C) 2003-2006, 2008-2010, 2014-2015, 2017 - TortoiseSVN
44 // Copyright (C) 2017 - TortoiseGit
@@ -124,9 +124,7 @@
124124
125125 int CSysImageList::GetFileIcon(LPCTSTR file, DWORD attributes, UINT extraFlags)
126126 {
127- SHFILEINFO sfi;
128- SecureZeroMemory(&sfi, sizeof sfi);
129-
127+ SHFILEINFO sfi = {0};
130128 SHGetFileInfo(file,
131129 attributes,
132130 &sfi, sizeof sfi,
旧リポジトリブラウザで表示