From 1320cc760343ecf1032cf888c7319e504257aa4d Mon Sep 17 00:00:00 2001 From: Christoph von Wittich Date: Sat, 7 Jan 2006 19:54:50 +0000 Subject: [PATCH] increased buffer size to max needed size replaced _stprintf with _sntprintf svn path=/trunk/; revision=20667 --- reactos/subsys/system/servman/query.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/reactos/subsys/system/servman/query.c b/reactos/subsys/system/servman/query.c index 2052cbeb0e8..24877d7a771 100644 --- a/reactos/subsys/system/servman/query.c +++ b/reactos/subsys/system/servman/query.c @@ -39,7 +39,7 @@ RefreshServiceList(VOID) { 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 @@ RefreshServiceList(VOID) /* 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 @@ RefreshServiceList(VOID) 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,