Skip to content

Commit 3305cfa

Browse files
committed
[ADVAPI32]
Fix QueryServiceStatusEx. svn path=/trunk/; revision=53270
1 parent 921b0cf commit 3305cfa

File tree

1 file changed

+7
-0
lines changed
  • reactos/dll/win32/advapi32/service

1 file changed

+7
-0
lines changed

reactos/dll/win32/advapi32/service/scm.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2526,6 +2526,13 @@ QueryServiceStatusEx(SC_HANDLE hService,
25262526
return FALSE;
25272527
}
25282528

2529+
if (cbBufSize < sizeof(SERVICE_STATUS_PROCESS))
2530+
{
2531+
*pcbBytesNeeded = sizeof(SERVICE_STATUS_PROCESS);
2532+
SetLastError(ERROR_INSUFFICIENT_BUFFER);
2533+
return FALSE;
2534+
}
2535+
25292536
RpcTryExcept
25302537
{
25312538
/* Call to services.exe using RPC */

0 commit comments

Comments
 (0)