Author: mkupfer
Date: Fri Apr 15 12:16:26 2011
New Revision: 51346
URL:
http://svn.reactos.org/svn/reactos?rev=51346&view=rev
Log:
potential memory problem fixed, obsolete assignment removed
Modified:
trunk/reactos/base/applications/taskmgr/trayicon.c
Modified: trunk/reactos/base/applications/taskmgr/trayicon.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/taskmgr/…
==============================================================================
--- trunk/reactos/base/applications/taskmgr/trayicon.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/taskmgr/trayicon.c [iso-8859-1] Fri Apr 15 12:16:26
2011
@@ -100,8 +100,6 @@
hOldBitmap = NULL;
iconInfo.fIcon = TRUE;
- iconInfo.xHotspot = 0;
- iconInfo.yHotspot = 0;
iconInfo.hbmMask = hBitmapMask;
iconInfo.hbmColor = hBitmap;
@@ -133,7 +131,7 @@
NOTIFYICONDATAW nid;
HICON hIcon = NULL;
BOOL bRetVal;
- WCHAR szMsg[256];
+ WCHAR szMsg[64];
memset(&nid, 0, sizeof(NOTIFYICONDATAW));
@@ -181,7 +179,7 @@
NOTIFYICONDATAW nid;
HICON hIcon = NULL;
BOOL bRetVal;
- WCHAR szTemp[256];
+ WCHAR szTemp[64];
memset(&nid, 0, sizeof(NOTIFYICONDATAW));
@@ -193,7 +191,7 @@
nid.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP;
nid.uCallbackMessage = WM_ONTRAYICON;
nid.hIcon = hIcon;
- LoadStringW(hInst, IDS_MSG_TRAYICONCPUUSAGE, szTemp, 256);
+ LoadStringW(hInst, IDS_MSG_TRAYICONCPUUSAGE, szTemp,
sizeof(szTemp)/sizeof(szTemp[0]));
wsprintfW(nid.szTip, szTemp, PerfDataGetProcessorUsage());
bRetVal = Shell_NotifyIconW(NIM_MODIFY, &nid);