mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 01:15:09 +00:00
add a buffer length check (fixes one service test)
svn path=/trunk/; revision=39395
This commit is contained in:
parent
e1f736659a
commit
f38aaf659b
1 changed files with 7 additions and 0 deletions
|
@ -4251,7 +4251,14 @@ DWORD RQueryServiceConfig2A(
|
||||||
L"Description",
|
L"Description",
|
||||||
&lpDescriptionW);
|
&lpDescriptionW);
|
||||||
if (dwError != ERROR_SUCCESS)
|
if (dwError != ERROR_SUCCESS)
|
||||||
|
{
|
||||||
|
if (cbBufSize < sizeof(SERVICE_DESCRIPTIONA))
|
||||||
|
{
|
||||||
|
*pcbBytesNeeded = sizeof(SERVICE_DESCRIPTIONA);
|
||||||
|
dwError = ERROR_INSUFFICIENT_BUFFER;
|
||||||
|
}
|
||||||
goto done;
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
dwRequiredSize = sizeof(SERVICE_DESCRIPTIONA) + ((wcslen(lpDescriptionW) + 1));
|
dwRequiredSize = sizeof(SERVICE_DESCRIPTIONA) + ((wcslen(lpDescriptionW) + 1));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue