Author: khornicek
Date: Sun Apr 6 20:10:24 2014
New Revision: 62673
URL:
http://svn.reactos.org/svn/reactos?rev=62673&view=rev
Log:
[KBSWITCH]
- fix possible buffer overrun
CID #716051
CID #716052
Modified:
trunk/reactos/base/applications/kbswitch/kbswitch.c
Modified: trunk/reactos/base/applications/kbswitch/kbswitch.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/kbswitch…
==============================================================================
--- trunk/reactos/base/applications/kbswitch/kbswitch.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/kbswitch/kbswitch.c [iso-8859-1] Sun Apr 6 20:10:24
2014
@@ -113,7 +113,7 @@
tnid.uCallbackMessage = WM_NOTIFYICONMSG;
tnid.hIcon = CreateTrayIcon(szLCID);
- lstrcpyn(tnid.szTip, szName, sizeof(tnid.szTip));
+ lstrcpyn(tnid.szTip, szName, sizeof(tnid.szTip) / sizeof(TCHAR));
Shell_NotifyIcon(NIM_ADD, &tnid);
}
@@ -142,7 +142,7 @@
tnid.uCallbackMessage = WM_NOTIFYICONMSG;
tnid.hIcon = CreateTrayIcon(szLCID);
- lstrcpyn(tnid.szTip, szName, sizeof(tnid.szTip));
+ lstrcpyn(tnid.szTip, szName, sizeof(tnid.szTip) / sizeof(TCHAR));
Shell_NotifyIcon(NIM_MODIFY, &tnid);
}