increased buffer size to max needed size
replaced _stprintf with _sntprintf
Modified: trunk/reactos/subsys/system/servman/query.c
_____
Modified: trunk/reactos/subsys/system/servman/query.c
--- trunk/reactos/subsys/system/servman/query.c 2006-01-07 19:28:04 UTC
(rev 20666)
+++ trunk/reactos/subsys/system/servman/query.c 2006-01-07 19:54:50 UTC
(rev 20667)
@@ -39,7 +39,7 @@
{
HICON hiconItem; /* icon for list-view items */
HIMAGELIST hSmall; /* image list for other views */
- TCHAR buf[256];
+ TCHAR buf[300];
/* Create the icon image lists */
hSmall = ImageList_Create(GetSystemMetrics(SM_CXSMICON),
@@ -53,7 +53,7 @@
/* set the number of services in the status bar */
LoadString(hInstance, IDS_SERVICES_NUM_SERVICES, szNumServices,
32);
- _stprintf(buf, szNumServices, NumServices);
+ _sntprintf(buf, 300, szNumServices, NumServices);
SendMessage(hStatus, SB_SETTEXT, 0, (LPARAM)buf);
@@ -67,7 +67,7 @@
DWORD dwValueSize;
/* open the registry key for the service */
- _stprintf(buf,
_T("System\\CurrentControlSet\\Services\\%s"),
+ _sntprintf(buf, 300,
_T("System\\CurrentControlSet\\Services\\%s"),
pServiceStatus[Index].lpServiceName);
if( RegOpenKeyEx(HKEY_LOCAL_MACHINE,