From 8b9baff196e1d42616d8a0ec1f69bab39d024ef3 Mon Sep 17 00:00:00 2001 From: Don Ho Date: Sun, 3 Aug 2014 10:48:49 +0000 Subject: [PATCH] [BUG_FIXED] (Author: versat) Fix Change Icon app memory leak and wrong usage of function memset. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1270 f5eea248-9336-0410-98b8-ebc06183d4e3 --- PowerEditor/src/tools/ChangeIcon/ChangeIcon.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/PowerEditor/src/tools/ChangeIcon/ChangeIcon.cpp b/PowerEditor/src/tools/ChangeIcon/ChangeIcon.cpp index 97b17a58..2754bb2a 100644 --- a/PowerEditor/src/tools/ChangeIcon/ChangeIcon.cpp +++ b/PowerEditor/src/tools/ChangeIcon/ChangeIcon.cpp @@ -121,7 +121,7 @@ bool Icon::readICO(TCHAR* filename) _entries = new ICONDIRENTRY[count()]; if(!ReadFile( hFile, _entries, sizeof(*_entries)*count(), &dwBytesRead, NULL )) { _tprintf(_T("Error reading file '%s'\n"), filename); return false; } // Read images - _imagesData=new LPBYTE[count()]; memset(_imagesData, sizeof(LPBYTE)*count(), 0); + _imagesData=new LPBYTE[count()]; memset(_imagesData, 0, sizeof(LPBYTE)*count()); for(int i=0; i